/* ======================================================================
   AHLI SUPPORT - GLOBAL STYLESHEET
   Design direction: premium cleaning company + modern SaaS dashboard
   ====================================================================== */

:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --lime: #8bc34a;
    --dark: #14181a;
    --dark-soft: #2a2f31;
    --grey-900: #1a1a1a;
    --grey-700: #4a4a4a;
    --grey-500: #767676;
    --grey-300: #d8dcd9;
    --grey-100: #f4f6f4;
    --white: #ffffff;
    --danger: #d32f2f;
    --warning: #f9a825;
    --info: #1976d2;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 8px 30px rgba(20, 24, 22, 0.08);
    --shadow-lg: 0 16px 50px rgba(20, 24, 22, 0.14);
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font);
    color: var(--grey-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------------- BUTTONS ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--grey-300); color: var(--grey-900); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b71c1c; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------- PUBLIC SITE HEADER ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--grey-300);
}
.site-header .nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}
.logo { font-size: 20px; font-weight: 800; color: var(--grey-900); display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { font-weight: 500; font-size: 14.5px; color: var(--grey-700); }
.main-nav a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.portal-btn {
    padding: 9px 18px;
    border: 1.5px solid var(--grey-900);
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
}
.portal-btn:hover { background: var(--grey-900); color: #fff; }
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ---------------- HERO ---------------- */
.hero {
    position: relative;
    padding: 100px 24px 90px;
    background: linear-gradient(160deg, var(--dark) 0%, var(--dark-soft) 100%);
    color: #fff;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(139,195,74,0.35), transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -160px; left: -100px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(46,125,50,0.4), transparent 70%);
    border-radius: 50%;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; text-align: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(139,195,74,0.15);
    border: 1px solid rgba(139,195,74,0.4);
    color: var(--lime);
    padding: 7px 16px; border-radius: 30px; font-size: 13px; font-weight: 600;
    margin-bottom: 24px;
}
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; letter-spacing: -0.5px; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,0.75); margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 64px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 28px; color: var(--lime); }
.hero-stat span { font-size: 13px; color: rgba(255,255,255,0.6); }

/* ---------------- SECTIONS ---------------- */
.section { padding: 90px 24px; }
.section-alt { background: var(--grey-100); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
    display: inline-block; color: var(--primary); font-weight: 700; font-size: 13px;
    letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 12px;
}
.section-head h2 { font-size: 34px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.5px; }
.section-head p { color: var(--grey-500); font-size: 16px; }

/* ---------------- SERVICES ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-card {
    background: #fff; border: 1px solid var(--grey-300); border-radius: var(--radius);
    padding: 32px 28px; transition: all 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-icon {
    width: 56px; height: 56px; border-radius: 14px; background: var(--grey-100);
    display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 20px;
}
.service-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.service-card p { color: var(--grey-500); font-size: 14.5px; }

/* ---------------- PORTFOLIO / GALLERY ---------------- */
.portfolio-card, .equipment-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--grey-300); transition: all 0.25s ease;
}
.portfolio-card:hover, .equipment-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-media {
    aspect-ratio: 4/3; width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    display: flex; align-items: center; justify-content: center; font-size: 40px; color: rgba(255,255,255,0.85);
    position: relative;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .tag {
    position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.55); color: #fff;
    padding: 4px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
}
.card-body { padding: 20px; }
.card-body h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.card-body p { color: var(--grey-500); font-size: 13.5px; }
.card-body .price { color: var(--primary); font-weight: 700; margin-top: 10px; font-size: 14px; }

/* ---------------- CONTACT / CTA ---------------- */
.cta-block {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: 24px; padding: 64px 40px; text-align: center; color: #fff;
    max-width: 1200px; margin: 0 auto;
}
.cta-block h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.cta-block p { color: rgba(255,255,255,0.85); margin-bottom: 28px; font-size: 16px; }

/* ---------------- FLOATING WHATSAPP BUTTON ---------------- */
.wa-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 500;
    background: #25D366; color: #fff; width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    box-shadow: 0 8px 24px rgba(37,211,102,0.5);
    animation: pulse 2.2s infinite;
}
.wa-float:hover { transform: scale(1.08); }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------------- FOOTER ---------------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 56px 24px 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto 40px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid p { font-size: 14px; line-height: 1.8; }
.footer-grid a { display: block; font-size: 14px; margin-bottom: 10px; color: rgba(255,255,255,0.65); }
.footer-grid a:hover { color: var(--lime); }
.footer-bottom { text-align: center; font-size: 13px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); max-width: 1200px; margin: 0 auto; }

/* ---------------- AUTH PAGES (login/portal) ---------------- */
.auth-body { background: var(--grey-100); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-wrap { width: 100%; max-width: 440px; text-align: center; }
.auth-logo { font-size: 22px; font-weight: 800; display: inline-block; margin-bottom: 28px; }
.auth-card, .portal-select {
    background: #fff; border-radius: var(--radius); padding: 40px 36px; box-shadow: var(--shadow-lg); text-align: left;
}
.auth-card h1, .portal-select h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-sub { color: var(--grey-500); font-size: 14px; margin-bottom: 28px; text-align: center; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--grey-300); border-radius: 9px; font-size: 14.5px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { color: var(--grey-500); font-size: 12.5px; margin-top: 5px; }
.auth-back { display: block; text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--grey-500); font-weight: 600; }
.auth-back:hover { color: var(--primary); }

.portal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.portal-card {
    border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm); padding: 26px 18px; text-align: center; transition: all 0.2s;
}
.portal-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.portal-icon { font-size: 32px; margin-bottom: 10px; }
.portal-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.portal-card p { font-size: 12.5px; color: var(--grey-500); }

.alert { padding: 13px 16px; border-radius: 9px; font-size: 13.5px; margin-bottom: 18px; }
.alert-error { background: #fdecea; color: #a13327; border: 1px solid #f5c6c0; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.alert-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.alert-warning { background: #fff8e1; color: #8a6100; border: 1px solid #ffe082; }

/* ======================================================================
   DASHBOARD SHELL (Management - desktop first / Operator - mobile first)
   ====================================================================== */
.app-shell { display: flex; min-height: 100vh; background: var(--grey-100); }

/* Sidebar (management) */
.sidebar {
    width: 250px; background: var(--dark); color: #fff; flex-shrink: 0;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-logo { padding: 24px 22px; font-weight: 800; font-size: 17px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo span { color: var(--lime); }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 9px;
    color: rgba(255,255,255,0.65); font-size: 14px; font-weight: 500; margin-bottom: 3px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active { background: var(--primary); color: #fff; }
.sidebar-nav .nav-icon { width: 18px; text-align: center; }
.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.sidebar-user-name { font-size: 13.5px; font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.5); }

.main-content { flex: 1; min-width: 0; }
.topbar {
    background: #fff; border-bottom: 1px solid var(--grey-300); padding: 18px 32px;
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50;
}
.topbar h1 { font-size: 20px; font-weight: 700; }
.page-body { padding: 28px 32px; }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--grey-300);
}
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; }
.stat-card .stat-label { color: var(--grey-500); font-size: 13px; margin-top: 4px; }
.icon-green { background: #e8f5e9; color: var(--primary); }
.icon-blue { background: #e3f2fd; color: var(--info); }
.icon-orange { background: #fff3e0; color: #ef6c00; }
.icon-red { background: #fdecea; color: var(--danger); }

/* Cards / panels */
.panel { background: #fff; border-radius: var(--radius); border: 1px solid var(--grey-300); margin-bottom: 24px; }
.panel-head { padding: 18px 24px; border-bottom: 1px solid var(--grey-300); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { font-size: 16px; font-weight: 700; }
.panel-body { padding: 24px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--grey-500); padding: 12px 16px; border-bottom: 2px solid var(--grey-300); white-space: nowrap; }
table td { padding: 14px 16px; border-bottom: 1px solid var(--grey-100); font-size: 14px; vertical-align: middle; }
table tr:hover td { background: var(--grey-100); }

/* Badges */
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-new { background: #e3f2fd; color: #0d47a1; }
.badge-assigned { background: #fff3e0; color: #ef6c00; }
.badge-progress { background: #fff8e1; color: #8a6100; }
.badge-completed { background: #e8f5e9; color: #1b5e20; }
.badge-verified { background: #e0f2f1; color: #00695c; }
.badge-cancelled { background: #fdecea; color: #a13327; }
.badge-active { background: #e8f5e9; color: #1b5e20; }
.badge-inactive { background: #f1f1f1; color: #666; }

/* Forms in panels */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; align-items: flex-end; }
.filter-bar .form-group { margin-bottom: 0; min-width: 160px; }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(20,24,22,0.55); z-index: 1000;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--grey-300); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--grey-500); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--grey-300); display: flex; gap: 10px; justify-content: flex-end; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--grey-300); }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before { content: ''; position: absolute; left: -28px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--primary); }
.timeline-item.incident::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.timeline-item b { font-size: 14px; display: block; }
.timeline-item .t-time { font-size: 12px; color: var(--grey-500); }
.timeline-item .t-notes { font-size: 13.5px; color: var(--grey-700); margin-top: 4px; }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--grey-300); position: relative; }
.photo-item img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.photo-item .p-tag { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 12px; font-weight: 700; }

/* Empty state */
.empty-state { text-align: center; padding: 50px 20px; color: var(--grey-500); }
.empty-state .e-icon { font-size: 40px; margin-bottom: 12px; }

/* ---------------- OPERATOR MOBILE-FIRST ---------------- */
.op-header {
    background: var(--dark); color: #fff; padding: 16px 20px; position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
}
.op-header .op-logo { font-weight: 800; font-size: 16px; }
.op-header .op-user { font-size: 12px; color: rgba(255,255,255,0.6); }
.op-body { padding: 18px 16px 90px; max-width: 640px; margin: 0 auto; }
.op-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--grey-300);
    display: flex; z-index: 100; box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}
.op-bottom-nav a { flex: 1; text-align: center; padding: 10px 4px 8px; font-size: 11px; color: var(--grey-500); font-weight: 600; }
.op-bottom-nav a .nav-ic { display: block; font-size: 20px; margin-bottom: 2px; }
.op-bottom-nav a.active { color: var(--primary); }

.job-card { background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--grey-300); padding: 18px; margin-bottom: 14px; }
.job-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.job-card .j-ticket { font-weight: 700; font-size: 14.5px; }
.job-card .j-meta { font-size: 13px; color: var(--grey-500); margin: 3px 0; }

.attend-card { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); border-radius: var(--radius); padding: 26px; color: #fff; text-align: center; margin-bottom: 20px; }
.attend-card .a-time { font-size: 30px; font-weight: 800; margin: 8px 0; }
.attend-card .a-date { font-size: 13px; opacity: 0.85; }
.attend-actions { display: flex; gap: 10px; margin-top: 18px; }

.action-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .sidebar { position: fixed; left: -260px; z-index: 300; transition: left 0.25s; }
    .sidebar.open { left: 0; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
    .hero h1 { font-size: 32px; }
    .hero p.lead { font-size: 15.5px; }
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .portal-cards { grid-template-columns: 1fr; }
    .page-body { padding: 18px; }
    .topbar { padding: 14px 18px; }
    .section { padding: 60px 20px; }
}
@media (max-width: 480px) {
    .grid-3, .grid-4, .stats-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
}

/* Print styles for reports */
@media print {
    .sidebar, .topbar, .op-header, .op-bottom-nav, .no-print { display: none !important; }
    .app-shell { display: block; }
    .page-body { padding: 0; }
    body { background: #fff; }
}
