/* =========================================
   VEAG OPS SHELL
   Full clean rebuild
========================================= */

/* =========================================
   ROOT TOKENS
========================================= */
:root {
    --veag-radius-xl: 28px;
    --veag-radius-lg: 22px;
    --veag-radius-md: 18px;
    --veag-space-section: 28px;

    --veag-brand-navy-950: #071827;
    --veag-brand-navy-900: #0b233a;
    --veag-brand-navy-800: #12375b;
    --veag-brand-navy-700: #174a76;
    --veag-brand-teal-500: #18c9c2;
    --veag-brand-blue-500: #1f6fb8;

    --veag-brand-gradient: linear-gradient(135deg, #0b233a 0%, #12375b 52%, #18c9c2 120%);
    --veag-brand-accent-gradient: linear-gradient(135deg, #18c9c2 0%, #1f6fb8 100%);

    --veag-ink-950: #071827;
    --veag-ink-900: #0b233a;
    --veag-ink-700: #25435f;
    --veag-ink-600: #49657b;
    --veag-ink-500: #6f8395;
    --veag-ink-400: #94a3b8;

    --veag-line-200: #d8e5ec;
    --veag-line-100: #eaf2f6;

    --veag-surface-0: #ffffff;
    --veag-surface-50: #f6fafc;
    --veag-surface-100: #eef6f8;

    --veag-success-bg: #ecfdf5;
    --veag-success-fg: #166534;
    --veag-success-line: #bbf7d0;

    --veag-warn-bg: #fffbeb;
    --veag-warn-fg: #92400e;
    --veag-warn-line: #fde68a;

    --veag-danger-bg: #fef2f2;
    --veag-danger-fg: #991b1b;
    --veag-danger-line: #fecaca;

    --veag-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --veag-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.06);
    --veag-shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.05);
}

/* =========================================
   WORDPRESS RESET
========================================= */
html,
body.veag-ops-template {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    background: #f4f7fb;
}

body.veag-ops-template .wp-site-blocks,
body.veag-ops-template .entry-content,
body.veag-ops-template .wp-block-post-content,
body.veag-ops-template .site-content,
body.veag-ops-template .content-area,
body.veag-ops-template main,
body.veag-ops-template .wp-block-group.alignfull,
body.veag-ops-template .wp-block-group.alignfull.is-layout-flow {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* =========================================
   APP LAYOUT
========================================= */
.veag-ops-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: #f4f7fb;
    position: relative;
}

/* =========================================
   SIDEBAR
========================================= */
.veag-ops-sidebar {
    flex: 0 0 232px;
    width: 232px;
    min-width: 232px;
    background: linear-gradient(180deg, #0b233a 0%, #071827 100%);
    color: #dce6f4;
    padding: 20px 14px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.veag-ops-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.veag-ops-sidebar__logo {
    width: 100px;
    height: auto;
    object-fit: contain;
}

.veag-ops-sidebar__title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.veag-ops-sidebar__subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}

/* =========================================
   NAVIGATION
========================================= */
.veag-ops-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.veag-ops-sidebar__section-label {
    padding: 10px 10px 4px;
    color: #93a7c4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.veag-ops-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.veag-ops-sidebar__link,
.veag-ops-sidebar__group-toggle,
.veag-ops-sidebar__sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: transparent;
    color: #d6e0ee;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.18s ease;
    box-sizing: border-box;
    border: none;
    outline: none;
}

.veag-ops-sidebar__link:hover,
.veag-ops-sidebar__group-toggle:hover {
    background: rgba(24, 201, 194, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.veag-ops-sidebar__link.is-active,
.veag-ops-sidebar__group.is-active-group > .veag-ops-sidebar__group-toggle {
    background: rgba(24, 201, 194, 0.12);
    color: #fff;
}

.veag-ops-sidebar__subnav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 24px;
}

/* =========================================
   MAIN
========================================= */
.veag-ops-main {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.veag-ops-main__inner {
    width: 100%;
    max-width: 100%;
}

/* =========================================
   MOBILE DRAWER
========================================= */

.veag-ops-sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: #0b233a;
    color: #ffffff;
    z-index: 100100;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);

    align-items: center;
    justify-content: center;

    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.veag-ops-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 24, 39, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 100050;
}

.veag-ops-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1024px) {

    .veag-ops-shell {
        display: block;
    }

    .veag-ops-sidebar-toggle {
        display: flex;
    }

    .veag-ops-sidebar {
		position: fixed !important;
		left: 0 !important;

		width: 300px !important;
		min-width: 300px !important;
		max-width: 85vw !important;

		height: 100vh !important;
		max-height: 100vh !important;

		transform: translateX(-100%);
		transition: transform 0.25s ease;

		z-index: 100090 !important;

		overflow-y: auto !important;
		overflow-x: hidden !important;

		-webkit-overflow-scrolling: touch;

		padding: 20px 14px 40px !important;
	}

    .veag-ops-sidebar.is-open {
        transform: translateX(0);
    }

    .veag-ops-main {
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.veag-ops-drawer-open {
        overflow: hidden;
    }

    .veag-section-head {
        flex-direction: column;
        align-items: stretch;
    }
}

/* WordPress admin bar compensation */
body.admin-bar .veag-ops-sidebar {
    top: 46px !important;
    height: calc(100vh - 46px) !important;
    max-height: calc(100vh - 46px) !important;
}

@media screen and (min-width: 783px) {
    body.admin-bar .veag-ops-sidebar {
        top: 32px !important;
        height: calc(100vh - 32px) !important;
        max-height: calc(100vh - 32px) !important;
    }
}

/* =========================================
   CONTENT SYSTEM
========================================= */
.veag-page {
    width: 100%;
    padding: 0 18px 28px;
    color: var(--veag-ink-950);
    box-sizing: border-box;
}

.veag-page * {
    box-sizing: border-box;
}

.veag-section {
    margin-bottom: var(--veag-space-section);
}

.veag-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}

.veag-section-head h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 800;
}

.veag-section-head p {
    margin: 0;
    color: var(--veag-ink-500);
    font-size: 14px;
    max-width: 72ch;
}

/* =========================================
   CARDS
========================================= */
.veag-card,
.veag-surface-card,
.veag-soft-card,
.veag-stat-card {
    border-radius: var(--veag-radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid rgba(13, 53, 88, 0.10);
    box-shadow: var(--veag-shadow-md);
    max-width: 100%;
}

.veag-card,
.veag-surface-card {
    padding: 20px;
}

.veag-soft-card,
.veag-stat-card {
    padding: 18px;
}

.veag-card--dark {
    background:
        radial-gradient(circle at 90% 10%, rgba(24,201,194,0.24), rgba(24,201,194,0) 28%),
        linear-gradient(180deg, #12375b 0%, #0b233a 100%);
    color: #fff;
}

/* =========================================
   BUTTONS
========================================= */
.veag-button,
.veag-action-button {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--veag-ink-950);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.18s ease;
}

.veag-button:hover,
.veag-action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.veag-button-primary {
    background: var(--veag-brand-accent-gradient);
    color: #fff;
    border-color: rgba(24, 201, 194, 0.55);
}

/* =========================================
   TABLES
========================================= */
.veag-table-wrap {
    background: #fff;
    border: 1px solid var(--veag-line-200);
    border-radius: 20px;
    padding: 18px;
    overflow-x: auto;
    box-shadow: var(--veag-shadow-md);
}

.veag-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.veag-table thead th {
    position: sticky;
    top: 0;
    background: var(--veag-surface-50);
    padding: 14px;
    font-size: 12px;
    text-transform: uppercase;
}

.veag-table td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--veag-line-100);
}

/* =========================================
   FORMS
========================================= */
.veag-form-group {
    margin-bottom: 16px;
}

.veag-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.veag-form-group input,
.veag-form-group textarea,
.veag-form-group select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1024px) {
    .veag-ops-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .veag-ops-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        min-width: 300px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 10001;
        overflow-y: auto;
    }

    .veag-ops-sidebar.is-open {
        transform: translateX(0);
    }

    .veag-ops-main {
        width: 100%;
    }

    body.veag-ops-drawer-open {
        overflow: hidden;
    }

    .veag-section-head {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 900px) {
    .veag-page {
        padding: 72px 12px 24px;
    }
}

@media (max-width: 520px) {
    .veag-page {
        padding: 72px 8px 24px;
    }

    .veag-card,
    .veag-surface-card,
    .veag-soft-card,
    .veag-table-wrap {
        padding: 14px;
        border-radius: 16px;
    }

    .veag-button,
    .veag-action-button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}