/*
 * Global Estate Consultancy - Administration Panel Stylesheet
 */

:root {
    --admin-sidebar-width: 260px;
    --admin-sidebar-collapsed-width: 70px;
    --admin-header-height: 70px;
    --color-sidebar-bg: #0f172a;
    --color-sidebar-text: #94a3b8;
    --color-sidebar-active: #FF9924;
}

body.admin-body {
    background-color: #f1f5f9;
    color: #334155;
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}
/* ========================================================
   Admin Layout Wrapper
   ======================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
     overflow-x: hidden;   /* ADD */
    width: 100%;       
}

/* Sidebar styling */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background-color: var(--color-sidebar-bg);
    color: var(--color-sidebar-text);
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.admin-sidebar__logo {
    height: var(--admin-header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.2);
}

.admin-sidebar__logo .logo-box__title {
    color: #ffffff;
}

.admin-sidebar__menu {
    flex-grow: 1;
    padding: 20px 0;
    list-style: none;
    overflow-y: auto;
}

.admin-sidebar__item {
    margin-bottom: 4px;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--color-sidebar-text);
    font-weight: 500;
    font-size: 1.4rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar__link:hover,
.admin-sidebar__link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
    border-left-color: var(--color-sidebar-active);
}

.admin-sidebar__link.active i {
    color: var(--color-sidebar-active);
}

.admin-sidebar__link i {
    font-size: 1.6rem;
    width: 20px;
    text-align: center;
}

/* Admin Main Content Container */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    height: var(--admin-header-height);
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.admin-header__title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.admin-header__user {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.admin-header__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 600;
}

.admin-header__dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 180px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: none;
    z-index: 100;
    list-style: none;
}

.admin-header__dropdown li a {
    display: block;
    padding: 10px 16px;
    font-size: 1.3rem;
    color: #475569;
}

.admin-header__dropdown li a:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.admin-header__user:hover .admin-header__dropdown {
    display: block;
}

/* Page container content */
.admin-content {
     padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;      /* ADD */
    max-width: 100%;         /* ADD */
    box-sizing: border-box;  /* ADD */
}

/* ========================================================
   Stats Grid Cards
   ======================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card__title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card__value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0f172a;
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.stat-card__icon--primary { background-color: rgba(10, 25, 47, 0.05); color: #0a192f; }
.stat-card__icon--secondary { background-color: rgba(255, 153, 36, 0.1); color: #FF9924; }
.stat-card__icon--success { background-color: rgba(16, 185, 129, 0.05); color: #10b981; }
.stat-card__icon--info { background-color: rgba(0, 180, 216, 0.05); color: #00b4d8; }

/* ========================================================
   Tables, Cards & Data presentation
   ======================================================== */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
    max-width: 100%;         /* ADD */
    box-sizing: border-box;  /* ADD */
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
}

.card-body {
    padding: 24px;
    box-sizing: border-box;  /* ADD */
}

/* Data Table custom design */
.table-responsive {
     width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive .table {
    min-width: 600px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 1.3rem;
}

.table th {
    padding: 14px 20px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

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

/* Action button configurations */
.actions-flex {
    display: flex;
    gap: 8px;
     flex-wrap: wrap;  /* ADD */
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.btn-icon--edit:hover { background-color: rgba(255, 153, 36, 0.1); color: #FF9924; }
.btn-icon--delete:hover { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge--success { background-color: #d1fae5; color: #065f46; }
.badge--warning { background-color: #fef3c7; color: #92400e; }
.badge--danger  { background-color: #fee2e2; color: #991b1b; }
.badge--error   { background-color: #fee2e2; color: #991b1b; }
.badge--info    { background-color: #e0f2fe; color: #075985; }

/* ========================================================
   Admin Table (used in CRUD pages)
   ======================================================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 1.3rem;
}

.admin-table th {
    padding: 12px 18px;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background-color: #f8fafc;
}

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

/* ========================================================
   Button Variants
   ======================================================== */
.btn--small {
    padding: 6px 12px !important;
    font-size: 1.2rem !important;
    border-radius: 5px !important;
}

.btn--danger {
    background-color: #ef4444;
    color: #ffffff;
    border: 1px solid #ef4444;
}

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

.btn--success {
    background-color: #10b981;
    color: #ffffff;
    border: 1px solid #10b981;
}

.btn--success:hover {
    background-color: #059669;
    border-color: #059669;
    color: #fff;
}

.btn--outline {
    background-color: transparent;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn--outline:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

/* Admin Login Layout
 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #0f172a;
}

.login-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
     box-sizing: border-box;  /* ADD */
}

.login-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.login-card__title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 24px;
    color: #0f172a;
}

/* Form Styles */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

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

    .login-card {
        padding: 24px;
    }
}

/* admin.css */
.categories-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .categories-layout {
        grid-template-columns: 1fr; /* stack form above list */
    }
}

/* Reusable two-column split layout (form + list admin pages) */
.admin-split-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    align-items: start;
}

.admin-split-layout--wide {
    grid-template-columns: 1fr 1.6fr;
}

.admin-split-layout--reverse {
    grid-template-columns: 1.3fr 1fr;
}

@media (max-width: 900px) {
    .admin-split-layout,
    .admin-split-layout--wide,
    .admin-split-layout--reverse {
        grid-template-columns: 1fr;
    }
}

/* Amenities checkbox grid (property add/edit forms) */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.table-responsive .admin-table {
    min-width: 520px;
}
@media (max-width: 600px) {
    .table td,
    .table th {
        padding: 8px 10px;
        font-size: 1.1rem;
    }
    .table td code {
        font-size: 1rem;
    }
    .admin-table td,
    .admin-table th {
        padding: 8px 10px;
        font-size: 1.1rem;
    }
    @media (max-width: 768px) {
    .admin-content {
        padding-top: 76px;   /* ADD: clears the hamburger button that now sits at top:82px */
    }
}
    .admin-content {
    padding: 16px;
}

.card-body {
    padding: 14px;
}

.form-label {
    font-size: 1.2rem;
}

.form-control {
    font-size: 1.2rem;
    padding: 8px 10px;
}

.btn {
    font-size: 1.2rem;
    padding: 8px 12px;
}

.table {
    font-size: 1.1rem;
}

.admin-header__title {
    font-size: 1.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.admin-header__user {
    flex-shrink: 0;
}

.admin-header__user span[style*="font-weight"] {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}
}