:root{
  --blue:#003947;
  --orange:#f26a21;
  --bg:#f4f7fb;
  --dark:#0f2630;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:#24333a;
}

.login{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:25px;
  background:linear-gradient(135deg,#003947,#0a7485);
}

.card{
  background:white;
  border-radius:18px;
  box-shadow:0 12px 30px rgba(0,0,0,.12);
  padding:24px;
}

.login .card{width:420px}

.logo{
  max-width:260px;
  display:block;
  margin:0 auto 18px;
}

h1,h2,h3{
  margin-top:0;
  color:var(--blue);
}

input,select,textarea{
  width:100%;
  padding:12px;
  border:1px solid #d9e1e8;
  border-radius:10px;
  margin:7px 0 14px;
  background:#fff;
}

textarea{min-height:100px}

.btn{
  border:0;
  border-radius:10px;
  padding:11px 16px;
  background:var(--blue);
  color:white;
  font-weight:bold;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}

.btn.orange{background:var(--orange)}
.btn.gray{background:#697880}

.top{
  height:70px;
  background:white;
  box-shadow:0 3px 12px rgba(0,0,0,.07);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
}

.top img{height:45px}

.layout{
  display:flex;
  min-height:calc(100vh - 70px);
}

.side{
  width:250px;
  background:var(--dark);
  color:white;
  padding:20px;
}

.side a{
  display:block;
  color:white;
  text-decoration:none;
  padding:12px;
  border-radius:8px;
  margin:5px 0;
}

.side a:hover,
.side a.active{
  background:rgba(255,255,255,.12);
}

.main{
  flex:1;
  padding:25px;
  overflow-x:auto;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}

.stat{
  border-left:5px solid var(--orange);
}

table{
  width:100%;
  border-collapse:collapse;
  background:white;
  border-radius:12px;
  overflow:hidden;
}

th,td{
  padding:12px;
  border-bottom:1px solid #edf0f2;
  text-align:left;
  vertical-align:middle;
}

th{
  background:#eef5f7;
  color:var(--blue);
}

.badge{
  padding:5px 10px;
  border-radius:30px;
  background:#eef5f7;
  display:inline-block;
}

.msg{
  padding:12px;
  border-radius:10px;
  margin:10px 0;
}

.ok{
  background:#e7f8ed;
  color:#146b2e;
}

.err{
  background:#ffe8e8;
  color:#8a1b1b;
}

.small{
  font-size:12px;
  color:#667;
}

/* Botones de acciones ordenados */
.actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:115px;
}

.actions .btn{
  display:block;
  width:100%;
  text-align:center;
  margin:0;
  padding:9px 12px;
}

/* Tablas más cómodas */
td{
  word-break:break-word;
}

@media(max-width:760px){
  .layout{
    display:block;
  }

  .side{
    width:100%;
  }

  .top{
    height:auto;
    padding:12px;
  }

  .top img{
    height:35px;
  }

  .main{
    padding:15px;
  }

  table{
    font-size:13px;
  }
}