/* ======================================
   SpinMenu Admin – main.css
   Professional, clean, responsive
   ====================================== */

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f4f1ed;
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 260px;
    background: #1e1b18;
    color: #eae5df;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.sidebar .logo {
    padding: 28px 20px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo .logo-icon {
    font-size: 28px;
}

.logo .logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #f0eae3;
}

.sidebar nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar ul {
    list-style: none;
    padding: 0 14px;
}

.sidebar ul li {
    margin: 2px 0;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #cbc3ba;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.sidebar ul li a i {
    width: 22px;
    font-size: 16px;
    text-align: center;
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar ul li.active a {
    background: rgba(111, 78, 55, 0.35);
    color: #fff;
    border-left: 3px solid #6F4E37;
    padding-left: 13px;
}

.sidebar ul li.logout {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.sidebar ul li.logout a {
    color: #e07b7b;
}

.sidebar ul li.logout a:hover {
    background: rgba(224, 123, 123, 0.12);
}

/* ---------- Main Content ---------- */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 24px 32px 40px;
    min-height: 100vh;
}

/* ---------- Top Bar ---------- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e4ddd6;
    margin-bottom: 28px;
}

.topbar h1,
.topbar h2 {
    font-size: 26px;
    font-weight: 600;
    color: #2d241e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar h2 i {
    color: #6F4E37;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #5f5347;
}

.user-info i {
    font-size: 28px;
    color: #6F4E37;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #6F4E37;
    color: #fff;
    box-shadow: 0 4px 12px rgba(111, 78, 55, 0.30);
}

.btn-primary:hover {
    background: #5a3d2b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(111, 78, 55, 0.35);
}

.btn-primary:active {
    transform: scale(0.96);
}

/* ---------- Stats Cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.stat-card {
    background: #fff;
    padding: 20px 22px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #efe9e3;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #f0eae3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #6F4E37;
    flex-shrink: 0;
}

.stat-details h3 {
    font-size: 14px;
    font-weight: 500;
    color: #8a7a6a;
    margin-bottom: 2px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #2d241e;
    margin: 0;
}

/* ---------- Welcome Box ---------- */
.welcome-box {
    background: #fff;
    padding: 28px 32px;
    border-radius: 16px;
    border: 1px solid #efe9e3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.welcome-box h2 {
    font-size: 22px;
    font-weight: 600;
    color: #2d241e;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.welcome-box p {
    color: #6b5d4f;
    line-height: 1.7;
    font-size: 15px;
    max-width: 600px;
}

/* ---------- Table Container ---------- */
.table-container {
    background: #fff;
    border-radius: 16px;
    padding: 20px 0 8px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #efe9e3;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead {
    background: #f8f5f1;
    border-bottom: 2px solid #e4ddd6;
}

table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: #4a3d32;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0ebe6;
    vertical-align: middle;
    color: #2d241e;
}

table tbody tr:hover {
    background: #faf8f6;
}

/* ---------- Table elements ---------- */
.thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
    background: #ede8e2;
    display: block;
}

.category-icon {
    font-size: 20px;
    margin-right: 6px;
}

.badge {
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

.badge.active {
    background: #4CAF50;
    color: #fff;
}

.badge.inactive {
    background: #E53935;
    color: #fff;
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon.edit {
    background: #e8f0fe;
    color: #1a73e8;
}

.btn-icon.edit:hover {
    background: #d2e3fc;
    transform: scale(1.05);
}

.btn-icon.delete {
    background: #fde8e8;
    color: #d32f2f;
}

.btn-icon.delete:hover {
    background: #fcd5d5;
    transform: scale(1.05);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .sidebar .logo {
        padding: 0;
        border: none;
        flex: 1;
    }
    .sidebar nav {
        padding: 0;
        width: 100%;
        margin-top: 12px;
    }
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 0;
    }
    .sidebar ul li {
        flex: 1 0 auto;
        margin: 0;
    }
    .sidebar ul li a {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 6px;
        justify-content: center;
    }
    .sidebar ul li.active a {
        border-left: none;
        padding-left: 12px;
    }
    .sidebar ul li.logout {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .topbar {
        flex-wrap: wrap;
        gap: 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-number {
        font-size: 22px;
    }
    .table-container {
        padding: 8px 0;
    }
    table th, table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* Category image thumb */
.cat-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0ebe6;
    display: block;
}
.no-image-placeholder {
    width: 50px;
    height: 50px;
    background: #f0ebe6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 20px;
}
.current-image-preview img {
    height: 60px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-top: 4px;
}

/* Add these at the end of main.css */

/* Search box (already present in page styles, but we keep it consistent) */
.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}
.search-box input {
    flex: 1;
    max-width: 300px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 15px;
    transition: 0.2s;
}
.search-box input:focus {
    border-color: #6F4E37;
    outline: none;
    box-shadow: 0 0 0 3px rgba(111,78,55,0.12);
}

/* Feedback stars */
.rating-stars {
    color: #F4B400;
    letter-spacing: 2px;
}

/* Feedback comment ellipsis */
.feedback-comment {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Feedback stats (for feedback.php) */
.feedback-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.feedback-stat {
    background: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #efe9e3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.feedback-stat .label {
    font-size: 13px;
    color: #8a7a6a;
}
.feedback-stat .value {
    font-size: 24px;
    font-weight: 700;
    color: #2d241e;
}


/* ===== MOBILE RESPONSIVE OVERRIDES ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        z-index: 1050;
        transition: left 0.3s ease;
        background: #2d241e;
        box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    }
    .sidebar.open { left: 0; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
    }
    .sidebar-overlay.active { display: block; }
    .main-content {
        margin-left: 0 !important;
        padding: 16px !important;
    }
    .topbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    .topbar h1, .topbar h2 { font-size: 18px; }
    .topbar .btn { font-size: 14px; padding: 6px 14px; }
    .menu-toggle {
        display: inline-block;
        background: none;
        border: none;
        font-size: 28px;
        color: #3d2a1c;
        cursor: pointer;
        padding: 0 10px;
    }
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px;
        font-size: 14px;
    }
    table th, table td { padding: 10px 8px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .feedback-stats { flex-direction: column; gap: 10px; }
    .modal-box { width: 95%; padding: 20px 16px; }
    .profile-grid { grid-template-columns: 1fr; }
    .qr-image-wrap img { width: 160px; height: 160px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar h1, .topbar h2 { font-size: 16px; }
    .tenant-info { font-size: 12px; padding: 4px 10px; }
    .btn { font-size: 13px; padding: 6px 12px; }
}
.menu-toggle { display: none; }
@media (max-width: 768px) {
    .menu-toggle { display: inline-block; }
}





