/* ============================================
   NextFlood - Main Stylesheet
   NextGen Design System (Dark Navy Theme)
   ============================================ */

:root {
    --bg-primary: #1a1d2e;
    --bg-secondary: #242842;
    --bg-sidebar: #1e2139;
    --bg-input: #2d3250;
    --bg-hover: #353a5c;
    --border-color: #353a5c;
    --border-light: #454b6d;
    --text-primary: #e8eaf6;
    --text-secondary: #9ca3c4;
    --text-muted: #6b7280;
    --accent-green: #4CAF50;
    --accent-pink: #e91e7a;
    --accent-yellow: #ffc107;
    --accent-cyan: #00bcd4;
    --accent-blue: #3f51b5;
    --accent-purple: #9c27b0;
    --sidebar-width: 250px;
    --header-height: 56px;
    --radius: 8px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --transition: 0.2s ease;
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #4dd0e1;
}

/* ---- App Layout ---- */

.app-layout {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
    max-width: 100%;
    overflow-x: hidden;
}

body.sidebar-collapsed .app-main {
    margin-left: 0;
}

.content-area {
    flex: 1;
    padding: 24px;
}

/* ---- Top Header ---- */

.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-breadcrumb {
    color: var(--text-secondary);
    font-size: 13px;
}

.header-breadcrumb a {
    color: var(--text-secondary);
}

.header-breadcrumb a:hover {
    color: var(--text-primary);
}

.header-breadcrumb .separator {
    margin: 0 6px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-search {
    position: relative;
}

.header-search input {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 12px 6px 32px;
    font-size: 13px;
    width: 240px;
    outline: none;
    transition: border-color var(--transition);
}

.header-search input:focus {
    border-color: var(--accent-cyan);
}

.header-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: border-color var(--transition);
}

.user-avatar:hover {
    border-color: var(--accent-cyan);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-width: 180px;
    display: none;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 13px;
    transition: background var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-dropdown .dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
}

.admin-badge {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

/* ---- Cards ---- */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

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

.card-header h2,
.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ---- Tables ---- */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-input);
}

tr:hover td {
    background: var(--bg-hover);
}

tr:last-child td {
    border-bottom: none;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    font-family: inherit;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent-green);
    color: #fff;
}

.btn-primary:hover {
    background: #43a047;
    color: #fff;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-pink);
    color: #fff;
}

.btn-danger:hover {
    background: #d81b60;
    color: #fff;
}

.btn-warning {
    background: var(--accent-yellow);
    color: #1a1d2e;
}

.btn-warning:hover {
    background: #ffb300;
    color: #1a1d2e;
}

.btn-cyan {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.btn-cyan:hover {
    background: #00acc1;
    color: var(--bg-primary);
}

.btn-blue {
    background: var(--accent-blue);
    color: #fff;
}

.btn-blue:hover {
    background: #303f9f;
    color: #fff;
}

.btn-purple {
    background: var(--accent-purple);
    color: #fff;
}

.btn-purple:hover {
    background: #7b1fa2;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.btn-success {
    background: var(--accent-green);
    color: #fff;
}

.btn-success:hover {
    background: #43a047;
    color: #fff;
}

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-link {
    background: var(--accent-green);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    text-decoration: none;
    transition: background var(--transition);
}

.btn-link:hover {
    background: #43a047;
    color: #fff;
}

/* ---- Forms ---- */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.form-control:focus {
    border-color: var(--accent-cyan);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    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='%239ca3c4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
    accent-color: var(--accent-green);
    width: 16px;
    height: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row > * {
    flex: 1;
    min-width: 180px;
}

.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ---- Badges ---- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(76, 175, 80, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(76, 175, 80, 0.25);
}

.badge-danger {
    background: rgba(233, 30, 122, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(233, 30, 122, 0.25);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.badge-info {
    background: rgba(0, 188, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 188, 212, 0.25);
}

.badge-primary {
    background: rgba(63, 81, 181, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(63, 81, 181, 0.25);
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.badge-admin {
    background: rgba(0, 188, 212, 0.15);
    color: var(--accent-cyan);
}

.badge-active {
    background: rgba(76, 175, 80, 0.15);
    color: var(--accent-green);
}

.badge-inactive {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
}

.badge-user {
    background: rgba(63, 81, 181, 0.15);
    color: var(--accent-blue);
}

.count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
}

.count-approved {
    background: var(--accent-green);
    color: #fff;
}

.count-declined {
    background: var(--accent-pink);
    color: #fff;
}

.count-ccn {
    background: var(--accent-yellow);
    color: #1a1d2e;
}

.count-unchecked {
    background: var(--text-muted);
    color: #fff;
}

/* ---- Alerts ---- */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: var(--accent-green);
}

.alert-danger {
    background: rgba(233, 30, 122, 0.1);
    border-color: rgba(233, 30, 122, 0.3);
    color: var(--accent-pink);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: var(--accent-yellow);
}

.alert-info {
    background: rgba(0, 188, 212, 0.1);
    border-color: rgba(0, 188, 212, 0.3);
    color: var(--accent-cyan);
}

.alert-primary {
    background: rgba(63, 81, 181, 0.1);
    border-color: rgba(63, 81, 181, 0.3);
    color: var(--accent-blue);
}

/* ---- Grid ---- */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.grid-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
}

@media (max-width: 1024px) {
    .grid-2, .grid-3, .grid-dashboard {
        grid-template-columns: 1fr;
    }
    .grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-stats {
        grid-template-columns: 1fr;
    }
}

/* ---- Page Header ---- */

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ---- Footer ---- */

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

/* ---- Toast ---- */

.toast-container {
    position: fixed;
    top: 70px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 20px;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-success {
    border-left: 3px solid var(--accent-green);
}

.toast-error {
    border-left: 3px solid var(--accent-pink);
}

.toast-info {
    border-left: 3px solid var(--accent-cyan);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- Loading ---- */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* ---- Auth Pages (login/register/verify) ---- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 36px 32px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.auth-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }
    .top-header {
        padding: 0 16px;
    }
    .header-search input {
        width: 160px;
    }
    .app-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .app-main {
        margin-left: 0;
    }
}

/* ---- Utility ---- */

.text-approved { color: var(--accent-green); }
.text-declined { color: var(--accent-pink); }
.text-ccn { color: var(--accent-yellow); }
.text-cyan { color: var(--accent-cyan); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--text-primary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-bold { font-weight: 700; }
.text-mono { font-family: 'Inter', monospace; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mx-1 { margin-left: 8px; margin-right: 8px; }
.mx-2 { margin-left: 16px; margin-right: 16px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ---- Empty State ---- */

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin: 0 auto 12px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---- Modal ---- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ============================================
   Mobile Menu Button (hamburger in top header)
   ============================================ */

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    transition: background var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* ============================================
   Mobile Responsive Overrides
   ============================================ */

@media (max-width: 1024px) {
    .content-area {
        padding: 20px;
    }
    .top-header {
        padding: 0 16px;
    }
    .header-search input {
        width: 180px;
    }
    .grid-2,
    .grid-3,
    .grid-dashboard {
        grid-template-columns: 1fr;
    }
    .grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .content-area {
        padding: 14px;
        max-width: 100%;
        overflow-x: hidden;
    }
    .top-header {
        height: 52px;
        padding: 0 12px;
        max-width: 100%;
    }
    .header-left {
        flex: 1;
        min-width: 0;
    }
    .header-breadcrumb {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-search {
        display: none;
    }
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    .grid-stats {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row > * {
        min-width: 0;
    }
    .form-group {
        margin-bottom: 14px;
    }
    .page-header h1 {
        font-size: 18px;
        word-break: break-word;
    }
    .page-header p {
        font-size: 13px;
    }
    .card {
        padding: 14px;
        max-width: 100%;
    }
    .card-header h2,
    .card-header h3 {
        font-size: 15px;
        word-break: break-word;
    }
    .app-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 12px 14px;
        font-size: 11px;
    }
    th, td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .btn {
        min-height: 40px;
    }
    .modal {
        width: calc(100% - 16px);
        margin: 8px;
    }
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 14px;
    }
    .toast-container {
        right: 8px;
        left: 8px;
        top: 60px;
    }
    .toast {
        font-size: 12px;
        padding: 10px 14px;
    }
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="url"],
    textarea {
        max-width: 100%;
    }
}

@media (max-width: 1024px) and (min-width: 641px) {
    .form-row > * {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .content-area > table,
    .card > table,
    .table-wrapper {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .table-wrapper {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
    }
}
