/* ============================================================
   Dashboard Zones — Desktop-first, 3-zone layout
   ============================================================ */

/* ---- Welcome Banner ---- */
.zone-welcome {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    color: #fff;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(79, 70, 229, 0.25);
}
.zone-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.zone-welcome::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}
.zone-welcome-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.zone-welcome h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}
.zone-welcome p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}
.zone-welcome-date {
    font-size: 1rem;
    opacity: 0.75;
    text-align: right;
}

/* ---- Zone Cards Grid (Dashboard Main) ---- */
.zone-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.zone-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.zone-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.zone-card-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
}
.zone-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 0;
}
.zone-card-icon .material-icons {
    font-size: 36px;
    color: #fff;
}
.zone-card-gradient {
    height: 6px;
    width: 100%;
}
.zone-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    color: #1e293b;
}
.zone-card-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}
.zone-card-stats {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0 1.5rem;
    margin-bottom: 1.25rem;
}
.zone-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}
.zone-stat-pill.blue { background: #eff6ff; color: #2563eb; }
.zone-stat-pill.green { background: #ecfdf5; color: #059669; }
.zone-stat-pill.amber { background: #fffbeb; color: #d97706; }
.zone-stat-pill.purple { background: #faf5ff; color: #7c3aed; }
.zone-stat-pill.red { background: #fef2f2; color: #dc2626; }
.zone-stat-pill.orange { background: #fff7ed; color: #ea580c; }
.zone-stat-pill.teal { background: #f0fdfa; color: #0d9488; }

.zone-card-action {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    margin-top: auto;
}
.zone-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Sarabun', sans-serif;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.zone-card-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.03);
}
.zone-card-btn .material-icons { font-size: 18px; }

/* Zone A — Blue */
.zone-a .zone-card-gradient { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.zone-a .zone-card-icon { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.zone-a .zone-card-btn { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.zone-a:hover { box-shadow: 0 12px 40px rgba(59,130,246,0.2); }

/* Zone B — Green */
.zone-b .zone-card-gradient { background: linear-gradient(90deg, #059669, #10b981); }
.zone-b .zone-card-icon { background: linear-gradient(135deg, #059669, #10b981); }
.zone-b .zone-card-btn { background: linear-gradient(135deg, #059669, #10b981); }
.zone-b:hover { box-shadow: 0 12px 40px rgba(5,150,105,0.2); }

/* Zone C — Purple */
.zone-c .zone-card-gradient { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.zone-c .zone-card-icon { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.zone-c .zone-card-btn { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.zone-c:hover { box-shadow: 0 12px 40px rgba(124,58,237,0.2); }

/* Zone D — Orange */
.zone-d .zone-card-gradient { background: linear-gradient(90deg, #ea580c, #f97316); }
.zone-d .zone-card-icon { background: linear-gradient(135deg, #ea580c, #f97316); }
.zone-d .zone-card-btn { background: linear-gradient(135deg, #ea580c, #f97316); }
.zone-d:hover { box-shadow: 0 12px 40px rgba(234,88,12,0.2); }

/* ---- Recent Activity ---- */
.zone-recent {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}
.zone-recent-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.zone-recent-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.zone-recent-table {
    width: 100%;
    border-collapse: collapse;
}
.zone-recent-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.zone-recent-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.zone-recent-table tr:last-child td { border-bottom: none; }
.zone-recent-table tr:hover td { background: #f8fafc; }

/* ---- Topbar Settings Icon ---- */
.topbar-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    margin-right: 8px;
}
.topbar-settings:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(30deg);
}
.topbar-settings .material-icons { font-size: 22px; color: #fff; }

/* ==== Zone Hub Pages ==== */

/* ---- Hub Page Header ---- */
.zone-hub-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
}
.zone-hub-back:hover { color: #4f46e5; transform: translateX(-4px); }
.zone-hub-back .material-icons { font-size: 20px; }

.zone-hub-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.zone-hub-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zone-hub-icon .material-icons { font-size: 28px; color: #fff; }
.zone-hub-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}
.zone-hub-title p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 2px 0 0 0;
}

/* ---- Hub Menu Cards ---- */
.zone-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.zone-hub-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border-left: 5px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.zone-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.zone-hub-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.zone-hub-card-icon .material-icons { font-size: 26px; color: #fff; }
.zone-hub-card-content { flex: 1; min-width: 0; }
.zone-hub-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.zone-hub-card-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}
.zone-hub-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}
.zone-hub-card-arrow {
    display: flex;
    align-items: center;
    color: #cbd5e1;
    transition: all 0.2s;
}
.zone-hub-card:hover .zone-hub-card-arrow { color: #6366f1; transform: translateX(4px); }

/* ---- Color Variants for Hub Cards ---- */
.hub-blue { border-left-color: #3b82f6; }
.hub-blue .zone-hub-card-icon { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.hub-green { border-left-color: #10b981; }
.hub-green .zone-hub-card-icon { background: linear-gradient(135deg, #059669, #10b981); }
.hub-orange { border-left-color: #f59e0b; }
.hub-orange .zone-hub-card-icon { background: linear-gradient(135deg, #f59e0b, #fb923c); }
.hub-teal { border-left-color: #14b8a6; }
.hub-teal .zone-hub-card-icon { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.hub-amber { border-left-color: #f59e0b; }
.hub-amber .zone-hub-card-icon { background: linear-gradient(135deg, #d97706, #f59e0b); }
.hub-emerald { border-left-color: #10b981; }
.hub-emerald .zone-hub-card-icon { background: linear-gradient(135deg, #059669, #10b981); }
.hub-purple { border-left-color: #8b5cf6; }
.hub-purple .zone-hub-card-icon { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.hub-indigo { border-left-color: #6366f1; }
.hub-indigo .zone-hub-card-icon { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.hub-red { border-left-color: #ef4444; }
.hub-red .zone-hub-card-icon { background: linear-gradient(135deg, #dc2626, #ef4444); }
.hub-gold { border-left-color: #eab308; }
.hub-gold .zone-hub-card-icon { background: linear-gradient(135deg, #ca8a04, #eab308); }
.hub-cyan { border-left-color: #06b6d4; }
.hub-cyan .zone-hub-card-icon { background: linear-gradient(135deg, #0891b2, #06b6d4); }

/* ---- Section Groups in Zone C ---- */
.zone-section-group {
    margin-bottom: 2rem;
}
.zone-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}
.zone-section-title .material-icons { font-size: 22px; }
.zone-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.zone-section-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    border-left: 4px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.zone-section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.zone-section-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.zone-section-card-icon .material-icons { font-size: 22px; color: #fff; }
.zone-section-card-text {
    flex: 1;
    min-width: 0;
}
.zone-section-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.zone-section-card-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}
.zone-section-card .badge-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* ---- Big Stat Cards (Zone B) ---- */
.zone-stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.zone-stat-big {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-left: 6px solid #e2e8f0;
    transition: all 0.25s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.zone-stat-big:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.zone-stat-big-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.zone-stat-big-icon .material-icons { font-size: 32px; color: #fff; }
.zone-stat-big h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #1e293b;
}
.zone-stat-big-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.zone-stat-big-detail {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #64748b;
}
.zone-stat-big-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.25rem;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
}
.stat-amber { border-left-color: #f59e0b; }
.stat-amber .zone-stat-big-icon { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-amber .zone-stat-big-number { color: #d97706; }
.stat-amber .zone-stat-big-btn { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-green { border-left-color: #10b981; }
.stat-green .zone-stat-big-icon { background: linear-gradient(135deg, #059669, #10b981); }
.stat-green .zone-stat-big-number { color: #059669; }
.stat-green .zone-stat-big-btn { background: linear-gradient(135deg, #059669, #10b981); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .zone-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .zone-hub-grid { grid-template-columns: 1fr; }
    .zone-stat-cards { grid-template-columns: 1fr; }
    .zone-welcome { padding: 1.5rem; }
    .zone-welcome h2 { font-size: 1.35rem; }
}
@media (max-width: 640px) {
    .zone-cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .zone-welcome-content { flex-direction: column; align-items: flex-start; }
    .zone-welcome-date { text-align: left; }
    .zone-section-grid { grid-template-columns: 1fr; }
    .zone-recent-table { font-size: 0.82rem; }
    .zone-recent-table th, .zone-recent-table td { padding: 8px 10px; }
    .zone-card h3 { font-size: 1.15rem; }
}
