/* ============================================================
   Authenticated shell styling — matches the auth-page palette.
   Same vars: --primary, --secondary, --accent, --bg, --card, etc.
   ============================================================ */

html, body {
    font-family: "Cairo", sans-serif !important;
    background:
        radial-gradient(circle at 15% 20%, rgba(20, 166, 166, 0.10), transparent 28%),
        radial-gradient(circle at 90% 8%, rgba(243, 179, 61, 0.12), transparent 24%),
        linear-gradient(135deg, #eef7fb 0%, #f8fbfd 45%, #edf5f8 100%);
    color: #1e293b;
}

/* ----- AppBar ----- */
.app-bar {
    background: linear-gradient(135deg, #0f5e8c 0%, #14a6a6 100%) !important;
    color: white !important;
    box-shadow: 0 12px 30px rgba(15, 94, 140, 0.20) !important;
}

.app-bar .mud-toolbar {
    min-height: 70px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: grid;
    place-items: center;
    color: white;
    backdrop-filter: blur(8px);
}

.app-brand-logo svg {
    width: 24px;
    height: 24px;
}

.app-brand-title h1 {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    color: white;
}

.app-brand-title p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.app-bar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.app-bar-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3b33d, #14a6a6);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
}

.app-bar-user .meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.app-bar-user .meta .name {
    font-weight: 700;
    color: white;
    font-size: 13px;
}

.app-bar-user .meta .role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
}

.app-bar-logout {
    color: white !important;
}

/* ----- Drawer / NavMenu ----- */
.app-drawer {
    background: #ffffff !important;
    border: 1px solid rgba(219, 231, 239, 0.9) !important;
    box-shadow: 0 18px 48px rgba(15, 94, 140, 0.06) !important;
}

.nav-section-title {
    padding: 18px 22px 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.nav-item-link {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin: 4px 12px;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    color: #334155 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    font-family: "Cairo", sans-serif !important;
}

.nav-item-link:hover {
    background: rgba(20, 166, 166, 0.08) !important;
    color: #0f5e8c !important;
    transform: translateX(2px);
}

.nav-item-link.active {
    background: linear-gradient(135deg, rgba(15, 94, 140, 0.10), rgba(20, 166, 166, 0.10)) !important;
    color: #0f5e8c !important;
    box-shadow: inset -3px 0 0 #14a6a6;
}

.nav-item-link .mud-icon-root {
    color: inherit !important;
}

/* ----- Page content ----- */
.app-content {
    padding: 24px;
}

.page-card {
    background: var(--card, #ffffff);
    border: 1px solid #dbe7ef;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 14px 36px rgba(15, 94, 140, 0.06);
}

.page-title {
    font-weight: 800;
    color: #0f5e8c;
    font-size: 22px;
    margin-bottom: 6px;
}

.page-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 18px;
}

/* ============================================================
   Manage pages (Airports, Airlines, Users, …) shared styling
   ============================================================ */
.manage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.manage-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f5e8c;
}

.manage-title p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.manage-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 280px;
}

.search-box svg {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7b93a7;
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.search-input {
    width: 100%;
    height: 44px;
    border: 1px solid #dbe7ef;
    border-radius: 14px;
    padding: 0 42px 0 16px;
    font-family: "Cairo", sans-serif;
    font-size: 14px;
    background: #fbfdff;
    transition: 0.18s ease;
    outline: none;
    color: #1e293b;
}

.search-input:focus {
    border-color: rgba(20,166,166,0.9);
    box-shadow: 0 0 0 4px rgba(20,166,166,0.12);
    background: #fff;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #0f5e8c, #14a6a6) !important;
    color: white !important;
    border-radius: 14px !important;
    padding: 0 18px !important;
    height: 44px !important;
    font-weight: 800 !important;
    font-family: "Cairo", sans-serif !important;
    box-shadow: 0 12px 26px rgba(15,94,140,0.22) !important;
    text-transform: none !important;
}

.btn-primary-gradient:hover {
    transform: translateY(-1px);
}

.manage-card {
    background: white;
    border: 1px solid #dbe7ef;
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(15,94,140,0.05);
    padding: 0;
    overflow: hidden;
}

/* ---- MudTable overrides ---- */
.manage-card .mud-table-root {
    background: transparent !important;
}

.manage-card .mud-table-toolbar {
    display: none !important;
}

.manage-card .mud-table-container {
    border-radius: 0;
}

.manage-card table {
    font-family: "Cairo", sans-serif;
}

.manage-card thead .mud-table-cell {
    background: #f4f8fb !important;
    color: #0f5e8c !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    border-bottom: 1px solid #dbe7ef !important;
}

.manage-card tbody .mud-table-cell {
    color: #1e293b;
    font-size: 14px;
    border-bottom: 1px dashed #e2e8f0 !important;
}

.manage-card tbody tr:hover {
    background: rgba(20,166,166,0.04) !important;
}

.row-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}

.row-pill.active   { background: rgba(22,163,74,0.10); color: #16a34a; }
.row-pill.inactive { background: rgba(148,163,184,0.18); color: #64748b; }

.pill-success { background: rgba(22,163,74,0.10);  color: #16a34a; padding:4px 12px; border-radius:999px; font-weight:800; font-size:12px; display:inline-flex; }
.pill-danger  { background: rgba(220,38,38,0.10);  color: #dc2626; padding:4px 12px; border-radius:999px; font-weight:800; font-size:12px; display:inline-flex; }
.pill-warn    { background: rgba(243,179,61,0.18); color: #b45309; padding:4px 12px; border-radius:999px; font-weight:800; font-size:12px; display:inline-flex; }
.pill-info    { background: rgba(15,94,140,0.10);  color: #0f5e8c; padding:4px 12px; border-radius:999px; font-weight:800; font-size:12px; display:inline-flex; }
.pill-muted   { background: rgba(148,163,184,0.18); color: #64748b; padding:4px 12px; border-radius:999px; font-weight:800; font-size:12px; display:inline-flex; }

.row-actions {
    display: inline-flex;
    gap: 4px;
}

.row-actions .mud-icon-button {
    background: #f4f8fb !important;
    color: #0f5e8c !important;
    border-radius: 10px !important;
    width: 34px !important;
    height: 34px !important;
}

.row-actions .mud-icon-button:hover {
    background: rgba(20,166,166,0.15) !important;
}

.row-actions .danger {
    color: #dc2626 !important;
}

.row-actions .danger:hover {
    background: rgba(220,38,38,0.10) !important;
}

/* ---- Custom pagination ---- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid #e2e8f0;
    background: #fbfdff;
    flex-wrap: wrap;
}

.pager-info {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.pager-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pager-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #dbe7ef;
    background: white;
    color: #334155;
    font-weight: 700;
    font-family: "Cairo", sans-serif;
    cursor: pointer;
    transition: 0.18s ease;
    padding: 0 10px;
}

.pager-btn:hover:not(:disabled) {
    background: rgba(20,166,166,0.08);
    color: #0f5e8c;
    border-color: rgba(20,166,166,0.4);
}

.pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pager-btn.active {
    background: linear-gradient(135deg, #0f5e8c, #14a6a6);
    color: white;
    border-color: transparent;
}

.pager-size {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.pager-size select {
    height: 36px;
    border-radius: 10px;
    border: 1px solid #dbe7ef;
    padding: 0 8px;
    background: white;
    font-family: "Cairo", sans-serif;
    color: #334155;
    font-weight: 700;
}

/* ---- Empty / loading ---- */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-weight: 600;
}

/* ============================================================
   Dialog styling
   ============================================================ */
.brand-dialog .mud-dialog {
    border-radius: 24px !important;
    border: 1px solid #dbe7ef !important;
    box-shadow: 0 28px 70px rgba(15,94,140,0.18) !important;
    overflow: hidden;
    font-family: "Cairo", sans-serif !important;
}

.brand-dialog .mud-dialog-title {
    background: linear-gradient(135deg, #0f5e8c, #14a6a6) !important;
    color: white !important;
    padding: 18px 22px !important;
    font-weight: 800 !important;
    font-size: 17px !important;
}

.brand-dialog .mud-dialog-content {
    padding: 22px 22px 8px !important;
    background: #fbfdff;
}

.brand-dialog .mud-dialog-actions {
    padding: 14px 22px 20px !important;
    background: #fbfdff;
    border-top: 1px dashed #e2e8f0;
}

.dialog-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #334155;
}

.dialog-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.dialog-input {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe7ef;
    border-radius: 14px;
    padding: 0 16px;
    font-family: "Cairo", sans-serif;
    font-size: 15px;
    background: white;
    outline: none;
    transition: 0.18s ease;
    color: #1e293b;
}

.dialog-input:focus {
    border-color: rgba(20,166,166,0.9);
    box-shadow: 0 0 0 4px rgba(20,166,166,0.12);
}

.dialog-error {
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.22);
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
}

.btn-ghost {
    background: transparent !important;
    color: #475569 !important;
    border: 1px solid #dbe7ef !important;
    border-radius: 12px !important;
    height: 42px !important;
    padding: 0 16px !important;
    font-weight: 700 !important;
    font-family: "Cairo", sans-serif !important;
    text-transform: none !important;
}

.btn-ghost:hover {
    background: #f1f5f9 !important;
}

/* ============================================================
   Danger / confirm-delete dialog variant
   ============================================================ */
.brand-dialog.danger .mud-dialog-title {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
    color: white !important;
    border-radius: 12px !important;
    height: 42px !important;
    padding: 0 18px !important;
    font-weight: 800 !important;
    font-family: "Cairo", sans-serif !important;
    box-shadow: 0 12px 26px rgba(220,38,38,0.22) !important;
    text-transform: none !important;
}

.btn-danger:hover {
    transform: translateY(-1px);
}

.confirm-delete-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.confirm-delete-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(220,38,38,0.10);
    border: 1px solid rgba(220,38,38,0.22);
    color: #dc2626;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.confirm-delete-text {
    flex: 1;
    min-width: 0;
}

.confirm-delete-message {
    color: #1e293b;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.55;
}

.confirm-delete-item {
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff7f7;
    border: 1px dashed rgba(220,38,38,0.25);
    color: #b91c1c;
    font-weight: 800;
    font-size: 14px;
    word-break: break-word;
}

.confirm-delete-hint {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}
