/* ============================================
   INFRATRACK GLOBAL CSS
   Enterprise Responsive UI Design System
   ============================================ */

/* Raleway Font */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ─────────────────────────────────────────────
   DESIGN TOKENS — Light mode defaults
   ───────────────────────────────────────────── */
:root {
    /* ── Brand ─────────────────────────────── */
    --blue:         #1E5BFF;
    --blue-d:       #1448d4;
    --blue-l:       #eef3ff;
    --blue-shadow:  rgba(30, 91, 255, 0.16);

    /* ── Text ──────────────────────────────── */
    --ink:          #0a0f1e;
    --ink-2:        #3d4460;
    --ink-3:        #7c84a0;

    /* ── Surfaces ──────────────────────────── */
    --bg:           #f4f6fb;
    --card:         #ffffff;
    --line:         #e4e8f2;
    --sidebar-bg:   #0d1323;

    /* ── Semantic ──────────────────────────── */
    --success:      #16a34a;
    --success-bg:   #f0fdf4;
    --warning:      #d97706;
    --warning-bg:   #fffbeb;
    --danger:       #dc2626;
    --danger-bg:    #fef2f2;

    /* ── Legacy compatibility aliases ─────── */
    --primary:       var(--blue);
    --primary-dark:  var(--blue-d);
    --primary-light: var(--blue-l);
    --secondary:     var(--ink-2);
    --bg-primary:    var(--card);
    --bg-secondary:  var(--bg);
    --bg-tertiary:   #eaecf4;
    --text-primary:  var(--ink);
    --text-secondary:var(--ink-2);
    --text-tertiary: var(--ink-3);
    --border:        var(--line);
    --border-dark:   #cdd3e0;
    --brand:         var(--blue);
    --brand-2:       var(--blue-d);
    --brand-dark:    var(--ink);
    --brand-navy:    var(--sidebar-bg);
    --brand-green:   var(--blue);
    --brand-blue:    var(--blue);
    --surface:       var(--card);
    --surface-soft:  var(--bg);
    --muted:         var(--ink-3);
    --amber:         #d97706;
    --rose:          #dc2626;
    --green:         #16a34a;

    /* ── 8-Point Spacing Grid ──────────────── */
    --spacing-2:  4px;
    --spacing-4:  8px;
    --spacing-8:  16px;
    --spacing-12: 24px;
    --spacing-16: 32px;
    --spacing-20: 40px;
    --spacing-24: 48px;

    /* ── Typography (Raleway Base) ───────────── */
    --font-sans:      'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:      'Menlo', 'Courier New', monospace;
    --font-size-xs:   12px;
    --font-size-sm:   14px;
    --font-size-base: 16px;
    --font-size-lg:   18px;
    --font-size-xl:   20px;
    --font-size-2xl:  24px;
    --font-size-3xl:  28px;
    --font-size-4xl:  32px;

    /* ── Standard Radii ────────────────────── */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* ── Component Sizing Standards ───────── */
    --input-height: 56px;
    --button-height: 52px;
    --table-row-height: 56px;
    --sidebar-expanded-width: 280px;
    --sidebar-collapsed-width: 72px;
    --header-height: 72px;

    /* ── Shadows ───────────────────────────── */
    --shadow-sm: 0 1px 3px rgba(10,15,30,0.06), 0 1px 2px rgba(10,15,30,0.03);
    --shadow-md: 0 4px 16px rgba(10,15,30,0.08), 0 2px 6px rgba(10,15,30,0.04);
    --shadow-lg: 0 8px 28px rgba(10,15,30,0.10), 0 4px 10px rgba(10,15,30,0.05);
    --shadow-xl: 0 20px 60px rgba(10,15,30,0.14);

    /* ── Z-index ───────────────────────────── */
    --z-dropdown: 1000;
    --z-modal:    1050;
}

/* ─────────────────────────────────────────────
   DARK MODE TOKENS
   ───────────────────────────────────────────── */
[data-theme="dark"] {
    --blue:         #4d7eff;
    --blue-d:       #1E5BFF;
    --blue-l:       rgba(30, 91, 255, 0.14);
    --blue-shadow:  rgba(77, 126, 255, 0.22);

    --ink:   #e8ecf8;
    --ink-2: #a8b2d0;
    --ink-3: #5e688a;

    --bg:         #0d1020;
    --card:       #131826;
    --line:       #1e273e;
    --sidebar-bg: #080c16;

    --bg-primary:    var(--card);
    --bg-secondary:  #171e30;
    --bg-tertiary:   #1d2438;
    --text-primary:  var(--ink);
    --text-secondary:var(--ink-2);
    --text-tertiary: var(--ink-3);
    --border:        var(--line);
    --border-dark:   #2c3555;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.22);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.28);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.32);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.38);
}

/* Flash prevention */
html[data-theme="dark"]  { background: #0d1020; color: #e8ecf8; }
html[data-theme="light"] { background: #f4f6fb; }

/* ── Universal Search Bar Standard (56px Height) ── */
.search-wrap,
.search-inline,
.workspace-search,
.notif-search,
.notification-search,
#notifSearchWrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.search-wrap .icon,
.search-inline .icon,
.workspace-search .icon,
.notif-search .icon,
.notification-search .icon,
#notifSearchWrap .icon,
#notifSearchWrap svg {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    color: var(--ink-3, #7c84a0) !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.search-wrap input[type="search"],
.search-wrap input[type="text"],
.search-wrap input,
.search-inline input,
.workspace-search input,
.notif-search input,
.notification-search input,
#notifSearch,
#attSearch,
#corrSearch,
#docSearch,
#teamSearch {
    box-sizing: border-box !important;
    padding: 0 16px 0 52px !important;
    height: var(--input-height, 56px) !important;
    line-height: var(--input-height, 56px) !important;
    font-size: 16px !important;
    font-family: var(--font-sans) !important;
    color: var(--ink, #0a0f1e) !important;
    background: var(--card, #ffffff) !important;
    border: 1.5px solid var(--line, #e4e8f2) !important;
    border-radius: var(--radius-md, 8px) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    text-indent: 0 !important;
}

.search-wrap input::placeholder,
.search-inline input::placeholder,
.workspace-search input::placeholder,
.notif-search input::placeholder,
.notification-search input::placeholder,
#notifSearch::placeholder,
#attSearch::placeholder,
#corrSearch::placeholder,
#docSearch::placeholder,
#teamSearch::placeholder {
    color: var(--ink-3, #7c84a0) !important;
    font-size: 16px !important;
    opacity: 1 !important;
}

/* ── Button Hierarchy Variants ─────────────────── */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.upgrade-btn,
.upgrade-btn:hover,
a.btn-primary:hover,
button.btn-primary:hover {
    color: #ffffff !important;
}

/* ── Financial Section IPC Cards & Remarks Alignment ── */
.finance-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

.finance-table th {
    padding: 16px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--ink-3, #7c84a0) !important;
    text-align: left !important;
    height: var(--table-row-height, 56px) !important;
}

.finance-table td {
    padding: 16px 20px !important;
    vertical-align: middle !important;
    font-size: 16px !important;
    color: var(--ink, #0a0f1e) !important;
    border-top: 1px solid var(--line) !important;
    border-bottom: 1px solid var(--line) !important;
    height: var(--table-row-height, 56px) !important;
}

.finance-table td:first-child {
    border-left: 1px solid var(--line) !important;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    padding-left: 20px !important;
}

.finance-table td:last-child {
    border-right: 1px solid var(--line) !important;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding-right: 20px !important;
}

.ipc-mini {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 0 !important;
}

.ipc-mini strong {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--ink, #0a0f1e) !important;
}

.ipc-mini small {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--brand, #1E5BFF) !important;
}

.remarks-cell,
td[data-label="REMARKS"],
.mobilized-field[data-label="REMARKS"] {
    text-align: left !important;
    padding-left: 20px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--ink-2, #3e4865) !important;
    background: transparent !important;
    word-break: break-word !important;
}

.btn-success {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1.5px solid #bbf7d0 !important;
}
.btn-success:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
}

.btn-danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1.5px solid #fecaca !important;
}
.btn-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.btn-warning {
    background: #fffbeb !important;
    color: #d97706 !important;
    border: 1.5px solid #fde68a !important;
}
.btn-warning:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

/* ─────────────────────────────────────────────
   BASE RESET
   ───────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base, 16px);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    font-weight: 400;
    overflow-x: hidden;
    min-width: 320px;
}

img, svg, canvas, video, iframe {
    max-width: 100%;
}

img, video, iframe {
    display: block;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY STANDARDS
   ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: var(--spacing-8, 16px);
}

h1 { font-size: var(--font-size-4xl, 32px); font-weight: 700; }
h2 { font-size: var(--font-size-3xl, 24px); font-weight: 600; }
h3 { font-size: var(--font-size-2xl, 20px); font-weight: 600; }
h4 { font-size: var(--font-size-xl,  18px); font-weight: 600; }
h5 { font-size: var(--font-size-lg,  16px); font-weight: 600; }
h6 { font-size: var(--font-size-base, 16px); font-weight: 600; }

p { margin-bottom: var(--spacing-8, 16px); font-size: 16px; line-height: 1.6; }

a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.18s;
}
a:hover { color: var(--blue-d); }

/* ── Form Container Shell Standard ──────────── */
.form-shell,
.form-container {
    width: 100%;
    margin: 0 auto;
}
@media (min-width: 768px)  { .form-shell, .form-container { max-width: 600px; } }
@media (min-width: 1024px) { .form-shell, .form-container { max-width: 640px; } }
@media (min-width: 1440px) { .form-shell, .form-container { max-width: 720px; } }

/* ─────────────────────────────────────────────
   BUTTONS (52px - 56px Height Standard)
   ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: var(--button-height, 52px);
    min-width: 120px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.14s;
    white-space: nowrap;
    text-decoration: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1440px) {
    .btn { min-width: 160px; max-width: 240px; }
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.btn-primary {
    background: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
    box-shadow: 0 2px 8px var(--blue-shadow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--blue-d);
    border-color: var(--blue-d);
    box-shadow: 0 4px 16px var(--blue-shadow);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px var(--blue-shadow);
}

.btn-secondary {
    background: var(--card);
    color: var(--ink-2);
    border-color: var(--line);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg);
    border-color: var(--blue);
    color: var(--blue);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-secondary);
    color: var(--ink-2);
    border-color: var(--line);
}

[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--bg-secondary);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-2);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--ink);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
    box-shadow: 0 2px 8px rgba(220,38,38,0.2);
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(220,38,38,0.28);
}

.btn-small {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    min-width: 80px;
}

.btn-large {
    height: 56px;
    padding: 0 28px;
    font-size: 16px;
    min-width: 140px;
}

.btn-icon {
    width: 52px;
    height: 52px;
    padding: 0;
    min-width: unset;
    border-radius: var(--radius-md, 8px);
}

/* ─────────────────────────────────────────────
   FORMS & INPUTS (56px Standard Height & 16px Padding)
   ───────────────────────────────────────────── */
.form-group { margin-bottom: var(--spacing-12, 24px); }

label {
    display: block;
    margin-bottom: var(--spacing-4, 8px);
    font-weight: 500;
    font-size: 14px;
    color: var(--ink-2);
    letter-spacing: 0.1px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
textarea,
select {
    width: 100%;
    height: var(--input-height, 56px);
    padding: 0 16px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md, 8px);
    background: var(--card);
    color: var(--ink);
    transition: border-color 0.18s, box-shadow 0.18s;
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    height: auto;
    min-height: 140px;
    padding: 16px;
    resize: vertical;
    line-height: 1.6;
}
@media (min-width: 1024px) {
    textarea { min-height: 160px; }
}

input:focus:not([type="checkbox"]):not([type="radio"]),
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-l);
}

input::placeholder { color: var(--ink-3); font-weight: 400; font-size: 16px; }

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c84a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
}

.select-icon-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
}

.select-icon-wrap select {
    padding-right: 42px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
}

.select-icon-wrap svg,
.select-icon-wrap .icon,
.select-icon-wrap .drop-arrow {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    color: var(--ink-3) !important;
    pointer-events: none !important;
    z-index: 5 !important;
}

[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-secondary);
    border-color: var(--line);
    color: var(--ink);
}

[data-theme="dark"] input:focus:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-l);
}

/* ─────────────────────────────────────────────
   CARDS (12px Radius & 24px Padding Standard)
   ───────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    transition: box-shadow 0.22s, border-color 0.22s, transform 0.18s;
}

.card:hover {
    border-color: rgba(30,91,255,0.18);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--line);
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}

.card-body { }

.card-footer {
    display: flex;
    gap: var(--spacing-8, 16px);
    padding-top: 20px;
    border-top: 1.5px solid var(--line);
    margin-top: 4px;
}

[data-theme="dark"] .card { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .card-header { border-color: var(--line); }
[data-theme="dark"] .card-footer { border-color: var(--line); }

/* ─────────────────────────────────────────────
   CONTAINERS & GRID (8-Point System)
   ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px)  { .container { padding: 0 24px; } }
@media (min-width: 1440px) { .container { padding: 0 48px; } }

.grid   { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; justify-content: center; }

/* ─────────────────────────────────────────────
   TABLES (56px Row & Header Height Standard)
   ───────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }

.table-shell {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-shell table {
    min-width: 100%;
}

th {
    padding: 16px;
    height: var(--table-row-height, 56px);
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--ink-3);
    background: var(--bg);
    border-bottom: 1.5px solid var(--line);
    white-space: nowrap;
}

td {
    padding: 16px;
    height: var(--table-row-height, 56px);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-2);
    vertical-align: middle;
    overflow-wrap: anywhere;
}

td:first-child { color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(30,91,255,0.03); }

[data-theme="dark"] th { background: var(--bg-secondary); color: var(--ink-3); border-color: var(--line); }
[data-theme="dark"] td { border-color: var(--line); color: var(--ink-2); }
[data-theme="dark"] td:first-child { color: var(--ink); }
[data-theme="dark"] tr:hover td { background: rgba(255,255,255,0.03); }

/* ─────────────────────────────────────────────
   BADGES
   ───────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-primary { background: var(--blue-l);  color: var(--blue); }
.badge-success { background: #f0fdf4;        color: #16a34a; }
.badge-warning { background: #fffbeb;        color: #d97706; }
.badge-danger  { background: #fef2f2;        color: #dc2626; }
.badge-info    { background: var(--blue-l);  color: var(--blue); }

[data-theme="dark"] .badge-primary { background: rgba(30,91,255,0.15);  color: #7da6ff; }
[data-theme="dark"] .badge-success { background: rgba(22,163,74,0.15);  color: #4ade80; }
[data-theme="dark"] .badge-warning { background: rgba(217,119,6,0.15);  color: #fbbf24; }
[data-theme="dark"] .badge-danger  { background: rgba(220,38,38,0.15);  color: #f87171; }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-active   { background: #f0fdf4;       color: #16a34a; }
.status-pending  { background: #fffbeb;       color: #d97706; }
.status-inactive { background: var(--bg);     color: var(--ink-3); }
.status-error    { background: #fef2f2;       color: #dc2626; }

/* ─────────────────────────────────────────────
   MODALS & DIALOGS (4-Tier Responsive Widths)
   ───────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,15,30,0.55);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active { display: flex; }

.modal-content {
    background: var(--card);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-xl, 16px);
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
    .modal-content { padding: 32px; width: 600px; }
}

@media (min-width: 1024px) {
    .modal-content { padding: 40px; width: 720px; max-width: 800px; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--line);
}

.modal-header h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); }

.modal-body { margin-bottom: 24px; }

.modal-footer {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1.5px solid var(--line);
    justify-content: flex-end;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm, 6px);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink-3);
    transition: all 0.18s;
    flex-shrink: 0;
    padding: 0;
}

.modal-close:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

/* ─────────────────────────────────────────────
   ENTERPRISE RESPONSIVE MEDIA QUERIES (4 TIERS)
   ───────────────────────────────────────────── */

/* Tier 1: Mobile (320px – 767px) */
@media (max-width: 767px) {
    .container { padding: 0 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select { height: 56px; font-size: 16px; }
    textarea { min-height: 140px; font-size: 16px; }
    .btn { height: 52px; font-size: 16px; padding: 0 20px; width: 100%; }
}

/* Tier 2: Tablet (768px – 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container { padding: 0 24px; }
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Tier 3: Laptop (1024px – 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container { padding: 0 32px; }
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
}

/* Tier 4: Desktop (1440px+) */
@media (min-width: 1440px) {
    .container { padding: 0 48px; }
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
}
