/* ================================================================
   portal.css — стили портала report.trigub.ru
   Используется: login.html, client.html, admin.html
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #2d3748;
  background: #f0f4f8;
  min-height: 100vh;
}

a { color: #1a6ad4; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "Fira Code", "Consolas", monospace; font-size: 13px;
       background: #edf2f7; padding: 1px 5px; border-radius: 4px; }

/* ── LOGIN PAGE ────────────────────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, #0f1f3d 0%, #1a3a6a 50%, #0d2f6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.login-logo-icon { font-size: 40px; }
.login-logo-text { color: #fff; }
.login-logo-text strong { display: block; font-size: 22px; letter-spacing: .3px; }
.login-logo-text span   { font-size: 15px; font-weight: 500; opacity: .9; letter-spacing: .2px; }

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-card h1 { font-size: 20px; margin-bottom: 6px; }
.login-hint    { color: #718096; font-size: 13px; margin-bottom: 24px; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  color: #2d3748;
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
.field input:focus,
.field select:focus { border-color: #1a6ad4; box-shadow: 0 0 0 3px rgba(26,106,212,.12); }

.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #1a6ad4, #0f4ba0);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 4px;
}
.btn-primary:hover { opacity: .9; }

.login-footer {
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 12px;
}
.login-footer a { color: rgba(255,255,255,.7); }

/* ── PORTAL HEADER ─────────────────────────────────────────────── */
.portal-header {
  background: linear-gradient(90deg, #0f1f3d 0%, #1a3a6a 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 100;
}
.portal-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.portal-brand-icon { font-size: 26px; }
.portal-brand-title { font-size: 16px; font-weight: 700; color: #fff; }
.portal-brand-sub   { font-size: 11px; color: #7eb4e8; }

.portal-client-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 14px;
}
.portal-client-info strong { color: #fff; }
.portal-site-link { color: #7eb4e8; font-size: 12px; }
.portal-site-link:hover { color: #fff; text-decoration: none; }

.btn-logout {
  padding: 7px 16px;
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 7px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,.2);
  white-space: nowrap;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.2); text-decoration: none; }

/* ── PORTAL MAIN ───────────────────────────────────────────────── */
.portal-main { padding: 40px 16px; }
.portal-inner { max-width: 1100px; margin: 0 auto; }

.portal-page-title { margin-bottom: 32px; }
.portal-page-title h1 { font-size: 26px; font-weight: 700; color: #1a2b4a; margin-bottom: 6px; }
.portal-page-title p  { color: #718096; font-size: 15px; }

/* ── REPORTS GRID ──────────────────────────────────────────────── */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.report-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  transition: all .18s;
  color: inherit;
  text-decoration: none;
}
.report-card:hover {
  border-color: #1a6ad4;
  box-shadow: 0 4px 20px rgba(26,106,212,.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.report-card-icon { font-size: 32px; flex-shrink: 0; }
.report-card-body { flex: 1; min-width: 0; }
.report-card-date {
  font-size: 18px;
  font-weight: 700;
  color: #1a2b4a;
  margin-bottom: 3px;
}
.report-card-title {
  font-size: 13px;
  color: #4a5568;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.report-card-meta { font-size: 12px; color: #a0aec0; }
.report-card-arrow { font-size: 20px; color: #cbd5e0; flex-shrink: 0; transition: color .15s; }
.report-card:hover .report-card-arrow { color: #1a6ad4; }

/* ── EMPTY STATE ───────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }

/* ── ADMIN TABLE ───────────────────────────────────────────────── */
.admin-table-wrap {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 24px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table thead th {
  background: #1a2b4a;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
.admin-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f7faff; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}
.badge-green { background: #c6f6d5; color: #276749; }
.badge-gray  { background: #edf2f7; color: #718096; }

.btn-sm {
  padding: 5px 12px;
  background: #ebf4ff;
  color: #1a6ad4;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s;
}
.btn-sm:hover { background: #bee3f8; text-decoration: none; }

.admin-hint {
  background: #fffff0;
  border: 1px solid #f6e05e;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  color: #744210;
}

/* ── FOOTER ────────────────────────────────────────────────────── */
.portal-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #a0aec0;
  margin-top: 20px;
}
.portal-footer a { color: #718096; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .portal-header-inner { padding: 12px 16px; }
  .portal-client-info  { display: none; }
  .login-card          { padding: 24px 20px; }
  .reports-grid        { grid-template-columns: 1fr; }
  .admin-table         { font-size: 12px; }
  .admin-table thead th,
  .admin-table tbody td { padding: 8px 10px; }
}
