@import url("https://cdn.jsdelivr.net/npm/dirham@latest/dist/css/dirham.css");

/* =========================================================
   JAL INVESTMENT LLC - UAE ADMIN & AGENT PORTAL STYLES
   Self-contained master stylesheet (No broken imports)
   ========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --gold: #d7a126;
    --gold2: #b78517;
    --navy: #082f52;
    --blue: #0e426f;
    --dark: #071827;
    --bg: #f4f6f8;
    --text: #27313c;
    --muted: #78818c;
    --border: #e2e6ea;
    --white: #fff;
    --jetinv-navy: #082f52;
    --jetinv-gold: #d7a126;
    --jetinv-gold-dark: #b78517;

    /* UAE Specific Variables */
    --uae-navy: #082f52;
    --uae-navy-dark: #071827;
    --uae-gold: #d7a126;
    --uae-gold-dark: #b78517;
    --uae-gold-soft: #fff8e8;
    --uae-green: #36a269;
    --uae-red: #cf5542;
    --uae-border: #e2e6ea;
    --uae-bg: #f4f6f8;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, "Dirham-Sans", sans-serif;
    color: var(--text);
    overflow-x: hidden;
}

.dirham-symbol {
    display: inline-block;
    font-style: normal;
    font-weight: inherit;
    line-height: 1;
    vertical-align: -0.05em;
    margin-right: 2px;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-page {
    background: #eef1f4;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 52% 48%;
}

.login-brand {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 70px;
    background: linear-gradient(rgba(4,28,48,.87),rgba(6,43,73,.91)), url('../images/06_dubai.png') center/cover no-repeat;
    color: #fff;
}

.brand-content {
    max-width: 620px;
}

.login-logo {
    width: 180px;
    max-height: 75px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 62px;
}

.eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.7px;
    margin-bottom: 14px;
}

.brand-content h1 {
    font-size: 44px;
    line-height: 1.15;
    margin: 0 0 22px;
    max-width: 550px;
}

.brand-content p {
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255,255,255,.78);
    max-width: 520px;
}

.brand-line {
    width: 48px;
    height: 3px;
    background: var(--gold);
    margin: 35px 0 20px;
}

.brand-content small {
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: #fff;
}

.login-card {
    width: 100%;
    max-width: 430px;
}

.mobile-logo {
    display: none;
}

.login-heading {
    margin-bottom: 34px;
}

.login-heading h2 {
    margin: 0 0 10px;
    font-size: 32px;
    color: var(--navy);
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3c4650;
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--border);
    padding: 0 62px 0 46px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.input-wrap input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(215,161,38,.10);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-weight: 700;
    font-size: 13px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.login-button {
    width: 100%;
    min-height: 52px;
    border: 0;
    background: var(--gold);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    transition: background 0.2s;
}

.login-button:hover {
    background: var(--gold2);
}

.alert-error {
    background: #fff3f1;
    color: #a33a2b;
    border-left: 3px solid #cf5542;
    padding: 13px 15px;
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.6;
}

.security-note {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #838c95;
    font-size: 12px;
}

.security-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #36a269;
}

.login-footer {
    margin-top: 36px;
    text-align: center;
    color: #a0a6ad;
    font-size: 11px;
}

/* =========================================================
   DASHBOARD & ADMIN LAYOUT
   ========================================================= */
.dashboard-page {
    background: var(--bg);
}

.admin-topbar {
    height: 72px;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    color: #fff;
}

.topbar-brand, .topbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-brand img {
    width: 118px;
    max-height: 45px;
    object-fit: contain;
}

.topbar-brand span {
    padding-left: 18px;
    border-left: 1px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.72);
    font-size: 13px;
}

.topbar-user div {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.topbar-user strong {
    font-size: 13px;
}

.topbar-user small {
    color: var(--gold);
    margin-top: 3px;
}

.logout-link {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.22);
    padding: 8px 13px;
    font-size: 12px;
    transition: background 0.2s;
}

.logout-link:hover {
    background: rgba(255,255,255,0.1);
}

.admin-layout {
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
    min-height: calc(100vh - 72px);
    width: 100%;
    max-width: 100%;
}

/* =========================================================
   DUBAI EXECUTIVE DARK GLASS SIDEBAR (COMPACT)
   ========================================================= */
.admin-sidebar {
    background: linear-gradient(180deg, #071827 0%, #09243d 55%, #061422 100%);
    border-right: 1px solid rgba(215, 161, 38, 0.2);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 4px 0 24px rgba(4, 18, 32, 0.14);
}

.sidebar-identity-card {
    background: linear-gradient(135deg, rgba(215, 161, 38, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(215, 161, 38, 0.28);
    border-radius: 7px;
    padding: 9px 11px;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-identity-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.sidebar-identity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--uae-gold);
    box-shadow: 0 0 8px rgba(215, 161, 38, 0.9);
}

.sidebar-identity-badge {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.1px;
    color: var(--uae-gold);
    text-transform: uppercase;
}

.sidebar-identity-title {
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-identity-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.62);
}

.sidebar-nav {
    flex: 1;
}

.sidebar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(215, 161, 38, 0.78);
    font-size: 8.5px;
    letter-spacing: 1.3px;
    font-weight: 800;
    padding: 0 8px 5px;
    text-transform: uppercase;
}

.sidebar-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(215, 161, 38, 0.25) 0%, transparent 100%);
}

.sidebar-space {
    margin-top: 13px;
}

.admin-sidebar a.sidebar-link {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: rgba(216, 226, 236, 0.82);
    padding: 6px 9px;
    margin-bottom: 2px;
    border-radius: 6px;
    border-left: 2.5px solid transparent;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-sidebar a.sidebar-link .nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #96adc2;
    flex-shrink: 0;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-sidebar a.sidebar-link .nav-icon svg {
    width: 13px;
    height: 13px;
}

.admin-sidebar a.sidebar-link .nav-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar a.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(3px);
}

.admin-sidebar a.sidebar-link:hover .nav-icon {
    background: rgba(215, 161, 38, 0.18);
    border-color: rgba(215, 161, 38, 0.45);
    color: #f3c254;
    transform: scale(1.05);
}

.admin-sidebar a.sidebar-link.active {
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(215, 161, 38, 0.22) 0%, rgba(215, 161, 38, 0.04) 100%);
    border-left-color: var(--uae-gold);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.admin-sidebar a.sidebar-link.active .nav-icon {
    background: linear-gradient(135deg, #e5b33a 0%, #b78517 100%);
    border-color: #f3c254;
    color: #071827;
    box-shadow: 0 2px 8px rgba(215, 161, 38, 0.45);
}

.sidebar-badge {
    background: linear-gradient(135deg, #ff4d4d 0%, #c92a2a 100%);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(224, 49, 49, 0.45);
}

.sidebar-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-btn {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding: 7px 10px !important;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

.sidebar-footer-btn:hover {
    background: rgba(215, 161, 38, 0.15) !important;
    border-color: rgba(215, 161, 38, 0.45);
    color: #fff !important;
}

.admin-content {
    padding: 36px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.dashboard-heading h1 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 29px;
}

.dashboard-heading p {
    margin: 0;
    color: var(--muted);
}

.today {
    background: #fff;
    border: 1px solid var(--border);
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 24px;
    position: relative;
}

.stat-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 34px;
    height: 3px;
    background: var(--gold);
}

.stat-card span {
    display: block;
    color: #69727c;
    font-size: 12px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin: 12px 0 9px;
    color: var(--navy);
    font-size: 28px;
}

.stat-card small {
    color: #9aa1a8;
}

.dashboard-panel,
.admin-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 26px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 100%;
}

.admin-grid > *,
.stats-grid > *,
.table-card,
.admin-card,
.dashboard-panel,
.stat-card {
    min-width: 0;
    max-width: 100%;
}

.admin-grid .admin-table {
    min-width: 0;
}

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

.panel-title h2 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 20px;
}

.panel-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.pending-badge {
    background: #fff8e8;
    color: #9b6a00;
    padding: 7px 11px;
    font-size: 11px;
    font-weight: 800;
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
}

.empty-state p {
    color: var(--muted);
    margin: 8px 0 0;
    font-size: 13px;
}

/* =========================================================
   PAGE HEADINGS, BUTTONS & ALERTS
   ========================================================= */
.content-header,
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 32px;
}

.content-header h1,
.page-heading h1 {
    margin: 0 0 8px;
    color: var(--jetinv-navy);
    font-size: 28px;
}

.content-header p,
.page-heading p {
    margin: 0;
    color: var(--muted);
}

.admin-primary-btn,
.admin-secondary-btn,
.admin-light-btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}

.admin-primary-btn {
    background: var(--jetinv-gold);
    color: #fff;
}

.admin-primary-btn:hover {
    background: var(--jetinv-gold-dark);
    color: #fff;
}

.admin-secondary-btn {
    background: var(--jetinv-navy);
    color: #fff;
}

.admin-secondary-btn:hover {
    background: #06233d;
}

.admin-light-btn {
    background: #fff;
    color: #5c6670;
    border: 1px solid var(--border);
}

.admin-light-btn:hover {
    background: #f8f9fa;
}

.admin-alert {
    padding: 14px 17px;
    margin-bottom: 22px;
    border-left: 3px solid;
    font-size: 13px;
    line-height: 1.6;
}

.admin-alert.success {
    background: #edf9f2;
    color: #28784c;
    border-color: #36a269;
}

.admin-alert.error {
    background: #fff3f1;
    color: #9d3b30;
    border-color: #cf5542;
}

.admin-alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

/* =========================================================
   TABLES & CARDS
   ========================================================= */
.filter-card,
.table-card,
.form-section,
.form-actions-bar {
    background: #fff;
    border: 1px solid var(--border);
}

.filter-card {
    padding: 18px;
    margin-bottom: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.filter-grid label,
.field label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #53606b;
    margin-bottom: 7px;
}

.filter-grid input,
.filter-grid select,
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    color: #313b44;
    outline: none;
}

.field textarea {
    resize: vertical;
}

.filter-grid input:focus,
.filter-grid select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--jetinv-gold);
    box-shadow: 0 0 0 3px rgba(215,161,38,.08);
}

.table-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.table-card-header h2 {
    margin: 0 0 5px;
    color: var(--jetinv-navy);
    font-size: 18px;
}

.table-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table th {
    text-align: left;
    padding: 13px 17px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    color: #7b848d;
    font-size: 10px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.admin-table td {
    padding: 14px 17px;
    border-bottom: 1px solid #edf0f2;
    color: #4b555e;
    font-size: 12px;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #fbfbfa;
}

.property-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.property-thumb {
    width: 58px;
    height: 48px;
    background: #edf0f2;
    overflow: hidden;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-thumb span {
    font-size: 9px;
    color: #9ba2a8;
}

.property-cell strong,
.property-cell small {
    display: block;
}

.property-cell strong {
    color: #26333f;
    margin-bottom: 5px;
}

.property-cell small {
    color: #969da4;
}

.status-pill {
    display: inline-block;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 800;
}

.status-published {
    color: #257449;
    background: #eaf7ef;
}

.status-approved {
    color: #246a86;
    background: #eaf6fb;
}

.status-pending {
    color: #936500;
    background: #fff6df;
}

.status-rejected {
    color: #a43c31;
    background: #fff0ed;
}

.status-draft {
    color: #666f77;
    background: #eff1f3;
}

.status-sold {
    color: #082f52;
    background: #e8eef4;
}

.status-rented {
    color: #7b3d99;
    background: #f7effb;
}

.table-empty {
    padding: 45px 20px;
    text-align: center;
    color: #8b939b;
}

.table-empty a {
    color: var(--jetinv-gold-dark);
    font-weight: 700;
}

/* =========================================================
   FORMS & SECTIONS
   ========================================================= */
.property-form {
    display: grid;
    gap: 20px;
}

.form-section {
    padding: 25px;
}

.form-section-title {
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.form-section-title > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.form-section-title > div > span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff8e8;
    color: var(--jetinv-gold-dark);
    font-size: 11px;
    font-weight: 900;
}

.form-section-title h2 {
    margin: 0 0 4px;
    color: var(--jetinv-navy);
    font-size: 17px;
}

.form-section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field.col-2 {
    grid-column: span 2;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.feature-check {
    min-height: 42px;
    margin: 0 !important;
    border: 1px solid var(--border);
    padding: 10px 11px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600 !important;
    font-size: 12px;
}

.feature-check input {
    accent-color: var(--jetinv-gold);
}

.upload-box {
    border: 1px dashed #cdd3d9;
    background: #fafbfb;
    padding: 22px;
}

.upload-box input {
    width: 100%;
}

.upload-box p {
    margin: 10px 0 0;
    color: #9299a0;
    font-size: 11px;
}

.form-actions-bar {
    padding: 20px 24px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 35px;
}

.form-actions-bar strong {
    color: var(--jetinv-navy);
    font-size: 13px;
}

.form-actions-bar p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.form-actions-buttons {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.form-actions-buttons button,
.form-actions-buttons a {
    display: inline-flex !important;
    width: auto !important;
    min-width: 140px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* =========================================================
   UAE BADGES, QUOTA GAUGES & ENHANCEMENTS
   ========================================================= */
.badge-gold {
    background: #fff8e8;
    color: #9b6a00;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 2px;
}

.badge-navy {
    background: #e8eef4;
    color: #082f52;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 2px;
}

.badge-success {
    background: #eaf7ef;
    color: #257449;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 2px;
}

.badge-danger {
    background: #fff0ed;
    color: #a43c31;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 2px;
}

.badge-secondary {
    background: #eff1f3;
    color: #666f77;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
}

/* Quota Meter */
.quota-meter-card {
    background: #fff;
    border: 1px solid var(--uae-border);
    padding: 22px;
    margin-bottom: 25px;
    position: relative;
}

.quota-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quota-meter-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--uae-navy);
}

.quota-meter-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quota-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #d7a126, #f3c254);
    transition: width 0.3s ease;
}

.quota-meter-fill.warning {
    background: #f59f00;
}

.quota-meter-fill.danger {
    background: #e03131;
}

.quota-meter-footer {
    display: flex;
    justify-content: space-between;
    color: #7b848d;
    font-size: 12px;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.plan-card {
    background: #fff;
    border: 1px solid var(--uae-border);
    padding: 26px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.plan-card.active-plan {
    border: 2px solid var(--uae-gold);
}

.plan-card-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--uae-gold);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    letter-spacing: 1px;
}

.plan-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--uae-navy);
    margin: 0 0 10px;
}

.plan-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--uae-gold-dark);
    margin-bottom: 15px;
}

.plan-price small {
    font-size: 13px;
    font-weight: 600;
    color: #8c959f;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    flex-grow: 1;
}

.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
    color: #4b555e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: "✓";
    color: var(--uae-gold);
    font-weight: 900;
}

/* Commission Calculator Box */
.calc-card {
    background: #fbfcfd;
    border: 1px solid var(--uae-border);
    padding: 22px;
    border-left: 4px solid var(--uae-gold);
    margin-bottom: 25px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.calc-result {
    background: #082f52;
    color: #fff;
    padding: 14px 18px;
    border-radius: 2px;
    text-align: right;
}

.calc-result small {
    display: block;
    font-size: 10px;
    color: var(--uae-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800;
}

.calc-result strong {
    font-size: 22px;
    font-weight: 900;
    display: block;
    margin-top: 4px;
}

.action-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--uae-border);
    background: #fff;
    color: #4b555e;
    cursor: pointer;
}

.btn-icon:hover {
    background: #f1f3f5;
    color: var(--uae-navy);
}

.btn-icon.danger {
    color: var(--uae-red);
}

.btn-icon.danger:hover {
    background: #fff0ed;
}

.btn-icon.gold {
    background: var(--uae-gold);
    color: #fff;
    border-color: var(--uae-gold);
}

.btn-icon.gold:hover {
    background: var(--uae-gold-dark);
}

/* Modals */
.modal-overlay,
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 24, 39, 0.7);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open,
.modal-overlay.active,
.modal-backdrop.open,
.modal-backdrop.active {
    display: flex;
}

.modal-dialog {
    background: #fff;
    width: 100%;
    max-width: 620px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--uae-navy);
}

.modal-close {
    background: transparent;
    border: 0;
    font-size: 20px;
    cursor: pointer;
    color: #8c959f;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--uae-border);
    background: #fbfcfd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.quota-alert-banner {
    background: #fff3f1;
    border: 1px solid #cf5542;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.quota-alert-icon {
    font-size: 24px;
}

.quota-alert-text strong {
    display: block;
    color: #9d3b30;
    font-size: 14px;
    margin-bottom: 3px;
}

.quota-alert-text p {
    margin: 0;
    font-size: 12px;
    color: #69241b;
}

.image-preview-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 1px solid var(--uae-border);
    margin-top: 8px;
    display: inline-block;
}

/* =========================================================
   COMPREHENSIVE RESPONSIVE SYSTEM
   ========================================================= */

/* Mobile Hamburger Toggle Buttons */
.mobile-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-right: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    border-radius: 4px;
}
.mobile-sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.25s ease;
}
.mobile-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 14px 4px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
}
.sidebar-close-btn {
    background: #f1f3f5;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    color: #495057;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 24, 39, 0.65);
    backdrop-filter: blur(2px);
    z-index: 9998;
}

/* Public Responsive Nav */
.public-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #fff;
    padding: 7px 12px;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.public-mobile-drawer {
    display: none;
    background: var(--uae-dark, #071827);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 5%;
}
.public-mobile-drawer.open {
    display: block;
}
.public-mobile-drawer a {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.public-mobile-drawer a.active,
.public-mobile-drawer a:hover {
    color: var(--uae-gold);
}
.public-mobile-drawer .drawer-btns {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.public-mobile-drawer .drawer-btns a {
    text-align: center;
    border-bottom: none;
    padding: 10px 14px;
}

/* Table Responsive wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

/* Public Grid Classes */
.hero-search-form {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr auto;
    gap: 12px;
    align-items: flex-end;
}
.properties-responsive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.emirates-responsive-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.plans-responsive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.value-prop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    text-align: center;
}
.property-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
.public-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.properties-filter-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

.two-col-responsive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.specs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.property-main-photo {
    height: 420px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}
.advertiser-contact-card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 24px;
    position: sticky;
    top: 96px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 1180px) {
    .admin-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 991px) {
    .mobile-sidebar-toggle {
        display: flex !important;
    }
    .public-menu-toggle {
        display: block !important;
    }
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-brand {
        display: none;
    }
    .login-panel {
        min-height: 100vh;
        padding: 30px 20px;
    }
    .mobile-logo {
        display: block;
        margin-bottom: 30px;
        text-align: center;
    }
    .mobile-logo img {
        max-width: 150px;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -310px;
        width: 290px;
        height: 100vh;
        z-index: 9999;
        background: linear-gradient(180deg, #071827 0%, #09243d 55%, #061422 100%);
        box-shadow: 4px 0 30px rgba(0,0,0,0.45);
        overflow-y: auto;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px 16px;
        display: flex !important;
        flex-direction: column;
    }
    body.sidebar-open .admin-sidebar {
        left: 0;
    }
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
    body.sidebar-open {
        overflow: hidden;
    }
    .sidebar-mobile-header {
        display: flex;
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .hero-search-form {
        grid-template-columns: 1fr 1fr;
    }
    .properties-responsive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .emirates-responsive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .plans-responsive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .value-prop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .property-detail-layout {
        grid-template-columns: 1fr;
    }
    .public-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .properties-filter-bar {
        grid-template-columns: 1fr 1fr;
    }
    .two-col-responsive-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .advertiser-contact-card {
        position: static !important;
    }
}

@media (max-width: 768px) {
    .admin-topbar {
        padding: 10px 14px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .topbar-brand-name {
        display: none !important;
    }
    .topbar-user {
        gap: 8px;
        font-size: 12px;
    }
    .topbar-user small {
        display: none;
    }
    .topbar-currency-badge {
        margin-right: 4px;
        padding: 2px 6px;
        font-size: 10px;
    }
    .logout-link {
        padding: 4px 8px;
        font-size: 11px;
    }
    .admin-content {
        padding: 18px 12px;
    }
    .content-header,
    .page-heading,
    .dashboard-heading,
    .form-actions-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    .stats-grid,
    .admin-form-grid,
    .filter-grid,
    .calc-grid {
        grid-template-columns: 1fr !important;
    }
    .field.col-2 {
        grid-column: span 1;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .hero-search-form {
        grid-template-columns: 1fr;
    }
    .properties-responsive-grid {
        grid-template-columns: 1fr;
    }
    .emirates-responsive-grid {
        grid-template-columns: 1fr;
    }
    .plans-responsive-grid {
        grid-template-columns: 1fr;
    }
    .value-prop-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .public-footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .properties-filter-bar {
        grid-template-columns: 1fr;
    }
    .plan-select-card {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .plan-select-card > div:last-child {
        width: 100%;
        text-align: left !important;
        border-top: 1px dashed #e9ecef;
        padding-top: 6px;
    }
    #plan_summary_box {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    #plan_summary_box > div:last-child {
        text-align: left !important;
    }
    .specs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .property-main-photo {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .property-main-photo {
        height: 220px;
    }
    .specs-grid {
        grid-template-columns: 1fr;
    }
    .topbar-user span {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .stat-card {
        padding: 16px;
    }
    .admin-primary-btn,
    .admin-secondary-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

.share-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}
