/* ============================================
   SEA ROUTE MARITIME - ADMIN PANEL
   ============================================ */
:root {
    --navy-900: #05142e;
    --navy-800: #0a1f44;
    --navy-700: #102a56;
    --navy-600: #1a3a6c;
    --gold-500: #d4a017;
    --gold-400: #e6b92e;
    --gold-600: #b88608;

    --white: #ffffff;
    --gray-50:  #fafbfc;
    --gray-100: #f4f6f9;
    --gray-200: #e4e8ee;
    --gray-300: #cfd6de;
    --gray-400: #9aa5b1;
    --gray-500: #6b7684;
    --gray-600: #4d5660;
    --gray-700: #333a43;
    --gray-800: #1f242c;

    --success: #27ae60;
    --warning: #f39c12;
    --danger:  #c0392b;
    --info:    #2980b9;

    --shadow-sm: 0 1px 2px rgba(10,31,68,.06);
    --shadow:    0 2px 8px rgba(10,31,68,.08);
    --shadow-md: 0 4px 16px rgba(10,31,68,.10);
    --shadow-lg: 0 10px 30px rgba(10,31,68,.14);

    --radius: 8px;
    --radius-sm: 4px;
    --side-w: 260px;

    --ff-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ff-head: Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--ff-body);
    background: var(--gray-100);
    color: var(--gray-700);
    line-height: 1.55;
    font-size: 14px;
    min-height: 100vh;
}

a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-600); }
code { font-family: "SF Mono", Menlo, Monaco, Consolas, monospace; background: var(--gray-100); padding: 2px 6px; border-radius: 3px; font-size: 12.5px; color: var(--navy-800); }
small { font-size: 12px; }
.text-muted { color: var(--gray-400); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.login-body::before {
    content: ""; position: fixed; inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212,160,23,.08) 0, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212,160,23,.06) 0, transparent 50%);
    pointer-events: none;
}

.login-wrap {
    width: 100%; max-width: 420px; position: relative; z-index: 1;
}
.login-brand { text-align: center; margin-bottom: 30px; color: var(--white); }
.login-logo {
    width: 110px; height: 110px;
    display: grid; place-items: center;
    margin: 0 auto 18px;
}
.login-logo > img,
.side-logo > img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.login-brand h1 {
    font-family: var(--ff-head); font-size: 28px; color: var(--white);
    font-weight: 700; letter-spacing: .5px;
}
.login-brand p { color: var(--gold-400); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }

.login-card {
    background: var(--white);
    padding: 40px 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--gold-500);
}
.login-card .form-group { margin-bottom: 18px; }
.login-card label { display: block; font-weight: 600; font-size: 13px; color: var(--navy-800); margin-bottom: 6px; }

.input-icon { position: relative; }
.input-icon i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--gray-400); font-size: 15px;
}
.input-icon input {
    width: 100%; padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.input-icon input:focus {
    outline: none; border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(212,160,23,.12);
}

.login-hint {
    text-align: center; margin-top: 18px; padding-top: 18px;
    border-top: 1px solid var(--gray-200); color: var(--gray-500);
}
.login-hint code { background: var(--navy-800); color: var(--gold-400); padding: 2px 8px; }

.back-link { text-align: center; margin-top: 22px; }
.back-link a { color: var(--gold-400); font-size: 13px; }

/* ============================================
   LAYOUT - Sidebar + Main
   ============================================ */
.sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--side-w);
    background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
    color: var(--white);
    overflow-y: auto;
    z-index: 100;
    transition: transform .3s;
}
.side-brand {
    padding: 24px 22px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.side-logo {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    flex-shrink: 0;
}
.side-brand h1 { font-family: var(--ff-head); font-size: 17px; color: var(--white); line-height: 1; font-weight: 700; }
.side-brand p { font-size: 11px; color: var(--gold-400); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 3px; }

.side-nav { padding: 16px 12px; }
.side-heading {
    display: block; font-size: 10.5px; font-weight: 700;
    color: rgba(255,255,255,.4);
    text-transform: uppercase; letter-spacing: 2px;
    padding: 16px 12px 8px;
}
.side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; margin-bottom: 2px;
    color: rgba(255,255,255,.75);
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
    font-size: 14px;
}
.side-link i { width: 18px; text-align: center; font-size: 15px; }
.side-link:hover { background: rgba(255,255,255,.05); color: var(--white); }
.side-link.active {
    background: rgba(212,160,23,.15); color: var(--gold-400);
    border-left: 3px solid var(--gold-500);
    padding-left: 11px;
}

.main-area {
    margin-left: var(--side-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

.top-bar {
    background: var(--white); padding: 16px 30px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 50;
}
.top-title h2 { font-family: var(--ff-head); font-size: 22px; color: var(--navy-800); font-weight: 700; }
.top-title p { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }

.top-user { display: flex; align-items: center; gap: 12px; }
.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--gray-100);
    border-radius: 40px;
}
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
    color: var(--gold-400);
    display: grid; place-items: center;
    font-weight: 700;
}
.user-chip strong { display: block; font-size: 13px; color: var(--navy-800); }
.user-chip small { color: var(--gray-500); font-size: 11px; }

.btn-ghost {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--gray-100); color: var(--navy-800);
    display: grid; place-items: center;
    transition: background .15s;
}
.btn-ghost:hover { background: var(--gold-500); color: var(--white); }

.content { padding: 28px 30px; flex: 1; }
.main-footer { padding: 16px 30px; text-align: center; color: var(--gray-500); border-top: 1px solid var(--gray-200); background: var(--white); }

/* ============================================
   STAT CARDS
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-bottom: 24px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    display: flex; align-items: center; gap: 18px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gray-300);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 56px; height: 56px; border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: 22px; color: var(--white);
}
.stat-info p { font-size: 12.5px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-info h3 { font-size: 28px; color: var(--navy-800); font-weight: 700; line-height: 1.1; margin: 4px 0 3px; font-family: var(--ff-head); }
.stat-info small { color: var(--gray-500); font-size: 11.5px; }

.stat-card.primary  { border-left-color: var(--navy-700); }
.stat-card.primary  .stat-icon { background: var(--navy-700); }
.stat-card.success  { border-left-color: var(--success); }
.stat-card.success  .stat-icon { background: var(--success); }
.stat-card.warning  { border-left-color: var(--warning); }
.stat-card.warning  .stat-icon { background: var(--warning); }
.stat-card.info     { border-left-color: var(--info); }
.stat-card.info     .stat-icon { background: var(--info); }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}
.card-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.card-head h3 {
    font-family: var(--ff-head); font-size: 17px; color: var(--navy-800); font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.card-head h3 i { color: var(--gold-500); font-size: 17px; }
.card-head h3 small { font-weight: 400; color: var(--gray-500); font-size: 13px; }
.card-body { padding: 22px 24px; }
.card-body.p-0 { padding: 0; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* ============================================
   BAR CHART (CSS-only)
   ============================================ */
.bar-chart {
    display: flex; justify-content: space-around; align-items: flex-end;
    height: 200px; padding: 10px 0 40px;
    position: relative;
}
.bar-wrap { flex: 1; text-align: center; position: relative; padding: 0 4px; }
.bar-value {
    position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
    font-size: 12px; font-weight: 600; color: var(--navy-800);
}
.bar {
    background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    margin: 0 auto;
    width: 70%;
    max-width: 50px;
    transition: height .6s ease-out;
}
.bar-label {
    position: absolute; bottom: -30px; left: 0; right: 0;
    font-size: 11.5px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px;
}

/* ============================================
   QUICK GRID
   ============================================ */
.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.quick-btn {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px;
    padding: 22px 12px;
    background: var(--gray-100);
    color: var(--navy-800);
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 13px; text-align: center;
    transition: background .15s, transform .15s;
    border: 1px solid transparent;
}
.quick-btn i { font-size: 26px; color: var(--gold-500); }
.quick-btn:hover {
    background: var(--white); color: var(--navy-800);
    border-color: var(--gold-500);
    transform: translateY(-2px);
}

/* ============================================
   TABLES
   ============================================ */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%; border-collapse: collapse;
    font-size: 13.5px;
}
.data-table thead th {
    background: var(--gray-100);
    padding: 12px 14px; text-align: left;
    font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px;
    font-weight: 700; color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table td small { color: var(--gray-500); font-size: 11.5px; }
.data-table .empty-row {
    text-align: center; padding: 50px 20px; color: var(--gray-400);
}
.data-table .actions { white-space: nowrap; }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 40px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
}
.badge-success { background: #e7f6ec; color: #1a7a3d; }
.badge-warning { background: #fff4e0; color: #96630a; }
.badge-danger  { background: #fdeaea; color: #8c1f15; }
.badge-info    { background: #e4f0f8; color: #1e5e87; }
.badge-muted   { background: var(--gray-100); color: var(--gray-500); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    border: 0; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 14px; font-family: inherit;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(212,160,23,.35); color: var(--navy-900); }
.btn-primary.btn-block { width: 100%; }
.btn-primary.btn-sm { padding: 8px 14px; font-size: 12.5px; }

.btn-ghost-sm {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: transparent; color: var(--navy-800);
    border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
    font-size: 12.5px; font-weight: 600;
    transition: all .15s;
}
.btn-ghost-sm:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

.btn-mini {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin: 0 1px;
    background: var(--gray-100); color: var(--navy-800);
    border-radius: var(--radius-sm); font-size: 12px;
    transition: background .15s, color .15s;
}
.btn-mini:hover { background: var(--navy-800); color: var(--gold-400); }
.btn-mini.danger:hover { background: var(--danger); color: var(--white); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12.5px; font-weight: 600;
    color: var(--navy-800);
    margin-bottom: 6px;
}
.form-group label small { font-weight: 400; color: var(--gray-500); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    background: var(--white);
    transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; border-color: var(--gold-500);
}

.grid-form {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.grid-form .col-span-2 { grid-column: 1 / -1; }

.inline-form {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.inline-form input, .inline-form select {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit;
}

.filter-bar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-bar input[type="text"] { min-width: 220px; flex: 1; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 13px; }
.filter-bar select { padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 13px; background: var(--white); min-width: 140px; }

.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ============================================
   DETAIL VIEW GRID
   ============================================ */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 24px;
    margin-bottom: 20px;
}
.detail-grid > div { min-width: 0; }
.detail-grid .col-span-2 { grid-column: span 2; }
.detail-grid label {
    display: block; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--gray-500); font-weight: 600;
    margin-bottom: 4px;
}
.detail-grid p { font-size: 14px; color: var(--navy-800); font-weight: 500; word-wrap: break-word; }
.sub-head {
    font-family: var(--ff-head);
    color: var(--navy-800); font-size: 15px;
    margin: 24px 0 14px; padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-500);
    display: inline-flex; align-items: center; gap: 8px;
}
.sub-head i { color: var(--gold-500); }

/* ============================================
   ENQUIRY LIST
   ============================================ */
.enquiry-list { list-style: none; }
.enquiry-list li {
    padding: 14px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px;
}
.enquiry-list li.unread { background: #fff9ec; border-left: 3px solid var(--gold-500); }
.enquiry-list li:last-child { border-bottom: 0; }
.enquiry-list li p { color: var(--gray-600); font-size: 12.5px; margin-top: 3px; }
.enquiry-list li small { color: var(--gray-500); font-size: 11.5px; white-space: nowrap; }

.enquiry-full-list { list-style: none; }
.enquiry-full-list li {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-200);
}
.enquiry-full-list li.unread { background: #fff9ec; border-left: 3px solid var(--gold-500); }
.enquiry-full-list li:last-child { border-bottom: 0; }
.enq-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px;
    margin-bottom: 8px;
}
.enq-head strong { color: var(--navy-800); font-size: 14px; }
.enq-head a { font-size: 12.5px; }
.enq-subject {
    font-size: 13px; color: var(--gray-600);
    margin-bottom: 8px;
}
.enq-subject i { color: var(--gold-500); margin-right: 4px; }
.enq-message {
    background: var(--gray-50);
    padding: 12px 14px; border-radius: var(--radius-sm);
    font-size: 13.5px; color: var(--gray-700);
    border-left: 3px solid var(--gray-300);
    margin-bottom: 10px;
}
.enq-actions { display: flex; gap: 6px; }
.enq-actions .btn-mini {
    width: auto; padding: 5px 12px; gap: 6px;
    font-size: 12px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
    border-left: 4px solid;
}
.alert.success { background: #e7f6ec; color: #1a7a3d; border-left-color: var(--success); }
.alert.error   { background: #fdeaea; color: #8c1f15; border-left-color: var(--danger); }
.alert.warning { background: #fff4e0; color: #96630a; border-left-color: var(--warning); }
.alert.info    { background: #e4f0f8; color: #1e5e87; border-left-color: var(--info); }
.alert i { font-size: 18px; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex; gap: 4px; padding: 16px 24px;
    justify-content: center;
    border-top: 1px solid var(--gray-200);
}
.pagination a {
    display: inline-grid; place-items: center;
    min-width: 34px; height: 34px;
    padding: 0 10px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    color: var(--navy-800);
    transition: all .15s;
}
.pagination a:hover { background: var(--gray-100); }
.pagination a.active { background: var(--navy-800); color: var(--gold-400); border-color: var(--navy-800); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .grid-2 { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .detail-grid .col-span-2 { grid-column: span 2; }
}

@media (max-width: 768px) {
    :root { --side-w: 0px; }
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .top-bar { padding: 14px 18px; }
    .content { padding: 20px 16px; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid .col-span-2 { grid-column: 1; }
    .grid-form { grid-template-columns: 1fr; }
    .grid-form .col-span-2 { grid-column: 1; }
    .top-title h2 { font-size: 18px; }
    .stats-row { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: 1fr; }
    .top-user .user-chip { display: none; }
}

@media print {
    .sidebar, .top-bar, .main-footer, .card-head > div, .btn-primary, .btn-ghost, .btn-mini, .form-actions, .inline-form, .filter-bar { display: none !important; }
    .main-area { margin-left: 0 !important; }
    .content { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ccc; }
    body { background: #fff; }
}
