:root {
  --navy: #123f6d;
  --navy-2: #3f8fd6;
  --teal: #63aee8;
  --teal-dark: #3f8fd6;
  --ink: #17324d;
  --muted: #5f7891;
  --light: #f1f9ff;
  --white: #fff;
  --line: #cfe6f7;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(6, 43, 87, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Manrope", Arial, sans-serif; color: var(--ink); background: #eef5fb; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.kicker { margin: 0 0 12px; color: #d8efff; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.kicker.dark { color: var(--teal-dark); }
.muted { color: var(--muted); }
.alert { padding: 13px 15px; margin: 18px 0; border-radius: 10px; font-size: 13px; font-weight: 700; }
.alert.success { color: #116149; background: #e7f8f1; border: 1px solid #b7e7d7; }
.alert.error { color: #9b291f; background: #fff0ee; border: 1px solid #f5c2bd; }

.login-page { min-height: 100vh; background: var(--navy); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 54px clamp(35px, 7vw, 110px); color: white; background: linear-gradient(145deg, rgba(6,43,87,.95), rgba(11,79,156,.82)), url('../assets/services/sea-freight.svg') center/cover; }
.login-brand-panel::after { content: ""; position: absolute; width: 600px; height: 600px; right: -230px; bottom: -240px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018); }
.login-brand-panel > * { position: relative; z-index: 2; }
.login-brand-panel h1 { max-width: 670px; margin: 0 0 20px; font-size: clamp(42px, 5.2vw, 72px); line-height: 1.05; letter-spacing: -3px; }
.login-brand-panel p:not(.kicker) { max-width: 640px; color: rgba(255,255,255,.72); line-height: 1.7; }
.login-brand-panel > small { color: rgba(255,255,255,.52); }
.login-form-panel { display: grid; place-items: center; padding: 40px; background: #f1f9ff; }
.login-card { width: min(450px, 100%); padding: 46px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0; font-size: 36px; letter-spacing: -1.5px; }
.login-card label { display: block; margin: 22px 0 0; font-size: 12px; font-weight: 800; color: #284760; }
.login-card input { width: 100%; margin-top: 8px; padding: 14px 15px; border: 1px solid #c5e0f3; border-radius: 10px; outline: none; }
.login-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(99,174,232,.1); }
.primary-button { width: 100%; margin-top: 25px; padding: 14px 18px; color: white; background: var(--teal); border: 0; border-radius: 10px; font-weight: 800; }
.primary-button:hover { background: #4b9bd8; }
.back-link { display: block; margin-top: 20px; color: var(--teal-dark); text-align: center; font-size: 13px; font-weight: 800; }
.admin-brand { display: inline-flex; align-items: center; gap: 11px; width: 100%; max-width: 220px; overflow: hidden; }
.admin-brand-logo { display: block; width: 100%; max-width: 220px; height: auto; max-height: 74px; padding: 0; object-fit: contain; object-position: left center; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.sidebar-logo { width: 100%; max-width: 220px; height: auto; max-height: 74px; }
.admin-brand > span { width: 43px; height: 43px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 10px; font-weight: 800; }
.admin-brand div { display: flex; flex-direction: column; line-height: 1.1; }
.admin-brand strong { font-size: 16px; }
.admin-brand small { margin-top: 5px; font-size: 10px; letter-spacing: .9px; text-transform: uppercase; opacity: .65; }
.admin-brand.light { color: white; }

.admin-page { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 270px; display: flex; flex-direction: column; padding: 28px 22px; color: white; background: var(--navy); }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; margin-top: 55px; }
.sidebar nav a { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 10px; color: rgba(255,255,255,.68); font-size: 13px; font-weight: 700; }
.sidebar nav a:hover, .sidebar nav a.active { color: white; background: rgba(255,255,255,.09); }
.sidebar nav i { width: 20px; text-align: center; font-style: normal; }
.sidebar nav b { min-width: 22px; height: 22px; margin-left: auto; display: grid; place-items: center; border-radius: 50%; background: var(--teal); font-size: 10px; }
.logout-form { margin-top: auto; }
.logout-form button { width: 100%; padding: 12px; color: rgba(255,255,255,.7); background: transparent; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; font-weight: 700; }
.logout-form button:hover { color: white; background: rgba(255,255,255,.07); }
.admin-main { margin-left: 270px; min-height: 100vh; }
.admin-header { position: sticky; top: 0; z-index: 20; min-height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 36px; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.admin-header div { display: flex; flex-direction: column; }
.admin-header small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.admin-header strong { margin-top: 4px; font-size: 14px; }
.view-site { margin-left: auto; padding: 10px 14px; color: var(--teal-dark); background: rgba(99,174,232,.09); border-radius: 9px; font-size: 12px; font-weight: 800; }
.sidebar-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.admin-content { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 44px 0 80px; }
.top-alert { margin-top: 0; }
.dashboard-section { scroll-margin-top: 105px; margin-bottom: 78px; }
.section-title-row { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 25px; }
.section-title-row h1, .section-title-row h2 { margin: 0 0 8px; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.1; letter-spacing: -1.8px; }
.section-title-row p:not(.kicker) { margin: 0; color: var(--muted); font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-grid article { display: flex; align-items: center; gap: 18px; padding: 25px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 35px rgba(6,43,87,.05); }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--teal-dark); background: rgba(99,174,232,.11); border-radius: 13px; }
.stat-grid small, .stat-grid strong { display: block; }
.stat-grid small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.stat-grid strong { margin-top: 4px; font-size: 28px; }


.settings-panel { padding: 28px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 36px rgba(6,43,87,.05); }
.settings-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.settings-fields label { display: block; color: #284760; font-size: 12px; font-weight: 800; }
.settings-fields input, .settings-fields textarea { width: 100%; margin-top: 8px; padding: 13px 14px; color: var(--ink); background: #ffffff; border: 1px solid #c5e0f3; border-radius: 10px; outline: none; resize: vertical; }
.settings-fields input:focus, .settings-fields textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(99,174,232,.1); }
.settings-fields small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.branding-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 25px; }
.branding-card { overflow: hidden; background: #f5fbff; border: 1px solid var(--line); border-radius: 15px; }
.branding-preview { display: grid; place-items: center; overflow: hidden; background: #e6f5ff; }
.branding-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.logo-preview { height: 205px; padding: 28px; background: #3f8fd6; }
.logo-preview img { object-fit: contain; padding: 10px 14px; background: #3f8fd6; border-radius: 10px; }
.hero-preview { height: 245px; }
.branding-card-body { padding: 20px; }
.branding-card-body h3 { margin: 0 0 7px; font-size: 18px; }
.branding-card-body p { min-height: 42px; margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.brand-remove { margin-top: 13px; }
.save-settings-button { min-width: 230px; margin-top: 24px; padding: 14px 20px; color: white; background: var(--teal); border: 0; border-radius: 10px; font-size: 13px; font-weight: 800; }
.save-settings-button:hover { background: #4b9bd8; }

.service-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-admin-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 10px 32px rgba(6,43,87,.05); }
.service-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e6f5ff; }
.service-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-preview::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to top, rgba(6,43,87,.72), transparent); }
.service-preview > span { position: absolute; z-index: 2; left: 14px; bottom: 12px; padding: 6px 9px; color: white; background: rgba(6,43,87,.58); border: 1px solid rgba(255,255,255,.18); border-radius: 7px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.service-admin-body { padding: 20px; }
.service-admin-body h3 { margin: 0 0 17px; font-size: 18px; }
.upload-form { display: grid; gap: 11px; }
.file-picker { display: block; padding: 14px; border: 1px dashed #add3ee; border-radius: 10px; background: #f5fbff; cursor: pointer; }
.file-picker input { display: none; }
.file-picker span, .file-picker small { display: block; }
.file-picker span { color: var(--teal-dark); font-size: 12px; font-weight: 800; }
.file-picker small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.small-primary { padding: 11px; color: white; background: var(--teal); border: 0; border-radius: 9px; font-size: 12px; font-weight: 800; }
.small-primary:hover { background: #4b9bd8; }
.text-danger { margin-top: 12px; padding: 0; color: var(--danger); background: none; border: 0; font-size: 11px; font-weight: 800; }

.enquiries-heading { align-items: end; }
.search-box { min-width: 320px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.search-box input { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #c5e0f3; border-radius: 9px; outline: none; text-transform: none; letter-spacing: 0; }
.search-box input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(99,174,232,.1); }
.enquiry-list { display: grid; gap: 14px; }
.enquiry-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 15px; }
.enquiry-card.new { border-left: 4px solid var(--teal); box-shadow: 0 10px 30px rgba(6,43,87,.06); }
.enquiry-card.hidden { display: none; }
.enquiry-summary { display: grid; grid-template-columns: 150px 1fr 180px minmax(230px, .9fr); gap: 22px; align-items: center; padding: 20px 22px; }
.enquiry-summary small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.enquiry-summary strong { display: block; margin-top: 4px; font-size: 13px; }
.status-column > small { margin-top: 8px; text-transform: none; letter-spacing: 0; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 99px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.status-pill.new { color: #3f8fd6; background: #eaf6ff; }
.status-pill.read { color: #5f7891; background: #eef2f3; }
.customer-column h3 { margin: 0; font-size: 16px; }
.customer-column p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.route-column strong span { color: var(--teal); margin: 0 5px; }
.enquiry-details { border-top: 1px solid var(--line); }
.enquiry-details summary { padding: 13px 22px; color: var(--teal-dark); background: #f5fbff; font-size: 11px; font-weight: 800; cursor: pointer; }
.enquiry-details[open] summary { border-bottom: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 22px 22px 15px; }
.detail-grid small, .detail-grid strong, .detail-grid a { display: block; }
.detail-grid small, .message-panel small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.detail-grid strong, .detail-grid a { margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
.detail-grid a { color: var(--teal-dark); font-weight: 800; }
.message-panel { margin: 0 22px; padding: 17px; background: #f1f9ff; border-radius: 10px; }
.message-panel p { margin: 8px 0 0; color: #4e718f; font-size: 13px; line-height: 1.7; }
.enquiry-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 18px 22px 22px; }
.enquiry-actions form { margin: 0; }
.reply-button, .secondary-button, .danger-button { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; border-radius: 8px; font-size: 11px; font-weight: 800; }
.reply-button { color: white; background: var(--teal); }
.secondary-button { color: #334e68; background: white; border: 1px solid #c5e0f3; }
.danger-button { color: var(--danger); background: #fff5f4; border: 1px solid #f0c9c5; }
.empty-state { padding: 65px 25px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 16px; }
.empty-state span { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--teal-dark); background: rgba(99,174,232,.1); border-radius: 50%; font-size: 24px; }
.empty-state h3 { margin: 0; }
.empty-state p, .no-results { color: var(--muted); font-size: 13px; }
.no-results { padding: 30px; text-align: center; background: white; border-radius: 12px; }

@media (max-width: 1150px) {
  .service-admin-grid { grid-template-columns: repeat(2, 1fr); }
  .enquiry-summary { grid-template-columns: 130px 1fr 170px; }
  .route-column { grid-column: 2 / -1; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .settings-fields, .branding-grid { grid-template-columns: 1fr; }
  .admin-brand-logo { max-width: 210px; max-height: 66px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 42vh; padding: 35px 28px; }
  .login-brand-panel h1 { font-size: 42px; }
  .login-form-panel { padding: 28px 18px; }
  .login-card { padding: 30px 24px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .admin-header { padding: 0 18px; }
  .admin-content { width: min(100% - 30px, 1320px); padding-top: 30px; }
  .stat-grid, .service-admin-grid { grid-template-columns: 1fr; }
  .section-title-row { align-items: start; flex-direction: column; }
  .search-box { min-width: 0; width: 100%; }
  .enquiry-summary { grid-template-columns: 1fr 1fr; gap: 16px; }
  .route-column { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .view-site { display: none; }
}
@media (max-width: 520px) {
  .settings-panel { padding: 20px; }
  .logo-preview, .hero-preview { height: 190px; }
  .save-settings-button { width: 100%; }
  .sidebar-logo { max-width: 200px; }
  .login-brand-panel h1 { font-size: 34px; letter-spacing: -1.8px; }
  .admin-header strong { max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .enquiry-summary { grid-template-columns: 1fr; }
  .route-column { grid-column: auto; }
  .enquiry-actions { flex-direction: column; }
  .enquiry-actions a, .enquiry-actions form, .enquiry-actions button { width: 100%; }
}
