/* ═══════════════════════════════════════════════════════════════════════════
   Pink Petals Decor Ltd — Admin Panel Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --rose:        #c0396b;
    --rose-light:  #e8537f;
    --rose-dark:   #9c2454;
    --gold:        #c9a84c;
    --gold-light:  #e2c47a;
    --dark:        #1a1a2e;
    --dark-mid:    #252544;
    --dark-soft:   #2e2e52;
    --sidebar-w:   240px;
    --white:       #ffffff;
    --bg:          #f4f5fa;
    --card-bg:     #ffffff;
    --border:      #e8e8f0;
    --text:        #2c2c3a;
    --muted:       #7a7a8c;
    --success:     #28a745;
    --warning:     #ffc107;
    --danger:      #dc3545;
    --shadow-sm:   0 2px 8px  rgba(26,26,46,.07);
    --shadow:      0 4px 20px rgba(26,26,46,.1);
    --radius:      10px;
    --radius-lg:   14px;
    --radius-pill: 100px;
    --transition:  .25s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--dark);
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.4rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--rose), var(--gold));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 1rem;
    flex-shrink: 0;
}
.brand-text { overflow: hidden; }
.brand-name {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    line-height: 1.2;
}
.brand-sub {
    display: block;
    font-size: .72rem;
    color: var(--gold-light);
    opacity: .7;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .78rem 1.2rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,.06);
    color: var(--white);
    border-left-color: var(--gold);
}
.nav-item.active {
    background: rgba(192,57,107,.2);
    color: var(--white);
    border-left-color: var(--rose);
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; }
.nav-item span { white-space: nowrap; }

.nav-badge {
    margin-left: auto;
    background: var(--rose);
    color: var(--white);
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .5rem;
    border-radius: var(--radius-pill);
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.06);
    display: flex;
    gap: .5rem;
}
.sidebar-footer-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    color: rgba(255,255,255,.5);
    font-size: .78rem;
    font-weight: 500;
    padding: .55rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
}
.sidebar-footer-link:hover { background: rgba(255,255,255,.07); color: var(--white); }
.sidebar-footer-link.logout:hover { background: rgba(220,53,69,.2); color: #ff6b6b; }

/* Collapsed sidebar */
.sidebar.collapsed { transform: translateX(-100%); }

/* ─────────────────────────────────────────
   MAIN CONTENT
───────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

/* ─────────────────────────────────────────
   TOP BAR
───────────────────────────────────────── */
.top-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-bar-left { display: flex; align-items: center; gap: 1rem; }

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    padding: .4rem .5rem;
    border-radius: var(--radius);
    line-height: 1;
    transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--bg); }

.page-heading {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.page-heading h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}
.page-heading i { color: var(--rose); }

.top-bar-right { display: flex; align-items: center; gap: 1rem; }

.admin-info { display: flex; align-items: center; gap: .6rem; font-size: .88rem; }
.admin-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--rose), var(--gold));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: .85rem;
}

.view-site-btn {
    display: flex; align-items: center; gap: .4rem;
    background: var(--dark);
    color: var(--white);
    padding: .45rem 1rem;
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
}
.view-site-btn:hover { background: var(--dark-mid); }

/* ─────────────────────────────────────────
   CONTAINER
───────────────────────────────────────── */
.container { padding: 1.5rem; }

/* ─────────────────────────────────────────
   STATS GRID
───────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.blue   { background: #e3f2fd; color: #1976d2; }
.stat-icon.orange { background: #fff3e0; color: #f57c00; }
.stat-icon.purple { background: #f3e5f5; color: #7b1fa2; }
.stat-icon.green  { background: #e8f5e9; color: #388e3c; }
.stat-icon.rose   { background: rgba(192,57,107,.1); color: var(--rose); }
.stat-icon.gold   { background: rgba(201,168,76,.12); color: var(--gold-dark, #a8882e); }

.stat-info h3 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: .15rem;
}
.stat-info p  { font-size: .8rem; color: var(--muted); font-weight: 500; }

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.card-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
}
.card-header h2 { font-size: 1rem; font-weight: 700; color: var(--text); }
.card-body { padding: 1.4rem; }

/* ─────────────────────────────────────────
   CONTENT GRID
───────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* ─────────────────────────────────────────
   TABLES
───────────────────────────────────────── */
.table-responsive { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .875rem; }

thead { background: var(--bg); }
thead th {
    padding: .9rem 1rem;
    font-weight: 700;
    text-align: left;
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fafafa; }
tbody td { padding: .85rem 1rem; color: var(--text); vertical-align: middle; }

/* ─────────────────────────────────────────
   STATUS BADGES
───────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .75rem;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-pending   { background: #fff3cd; color: #856404; }
.status-approved  { background: #d1ecf1; color: #0c5460; }
.status-completed { background: #d4edda; color: #155724; }
.status-rejected  { background: #f8d7da; color: #721c24; }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: var(--white) !important;
    padding: .55rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: .82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(192,57,107,.3); }

.btn-small { padding: .38rem .75rem; font-size: .78rem; }

.btn-secondary {
    background: var(--bg) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border);
    box-shadow: none;
}
.btn-secondary:hover { background: var(--border) !important; box-shadow: none; transform: none; }

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #a71d2a) !important;
    box-shadow: none;
}
.btn-danger:hover { box-shadow: 0 4px 12px rgba(220,53,69,.3); }

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold), #a8882e) !important;
    color: var(--dark) !important;
}

/* ─────────────────────────────────────────
   FORMS
───────────────────────────────────────── */
.form-group {
    margin-bottom: 1.1rem;
}
.form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--rose); }

/* ─────────────────────────────────────────
   ALERTS
───────────────────────────────────────── */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ─────────────────────────────────────────
   MODAL
───────────────────────────────────────── */
.modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.modal.open { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 640px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }

.modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.modal-close {
    background: var(--bg);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .9rem;
    color: var(--muted);
    transition: all var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

/* ─────────────────────────────────────────
   QUICK STATS
───────────────────────────────────────── */
.quick-stats { display: grid; gap: 1rem; padding: 1rem; }
.quick-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem;
    background: var(--bg);
    border-radius: var(--radius);
}
.quick-stat i { font-size: 1.3rem; color: var(--rose); width: 28px; text-align: center; }
.quick-stat h4 { font-size: 1.1rem; font-weight: 800; color: var(--text); line-height: 1; }
.quick-stat p  { font-size: .78rem; color: var(--muted); }

/* ─────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────── */
.login-page {
    display: flex;
    min-height: 100vh;
    background: var(--dark);
}
.login-visual {
    flex: 1;
    background: linear-gradient(135deg, var(--dark-mid), var(--dark-soft)),
                url('https://images.unsplash.com/photo-1519167758481-83f29da8c5e0?w=1200&q=70') center/cover no-repeat;
    background-blend-mode: multiply;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}
.login-visual::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom right, rgba(192,57,107,.3), rgba(201,168,76,.2));
}
.login-visual-content { position: relative; z-index: 1; text-align: center; }
.login-visual-content .brand-logo {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--rose), var(--gold));
    border-radius: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: var(--white);
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(192,57,107,.4);
}
.login-visual-content h1 {
    font-size: 2rem; color: var(--white); font-family: 'Inter', sans-serif; margin-bottom: .5rem;
}
.login-visual-content p { color: rgba(255,255,255,.65); font-size: .95rem; }

.login-panel {
    width: 440px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
}
.login-box { width: 100%; }
.login-box h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: .4rem; }
.login-box p  { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: var(--white);
    padding: .85rem;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(192,57,107,.35); }

/* ─────────────────────────────────────────
   PAGINATION
───────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1.2rem; justify-content: center; }
.pagination a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}
.pagination a:hover, .pagination a.active { background: var(--rose); border-color: var(--rose); color: var(--white); }

/* ─────────────────────────────────────────
   SEARCH BAR
───────────────────────────────────────── */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 340px;
}
.search-bar input {
    width: 100%;
    padding: .6rem 1rem .6rem 2.4rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: .88rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition);
}
.search-bar input:focus { border-color: var(--rose); }
.search-bar i {
    position: absolute;
    left: .85rem;
    top: 50%; transform: translateY(-50%);
    color: var(--muted);
    font-size: .85rem;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .content-grid { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { width: 100%; padding: 2rem 1.5rem; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .top-bar { padding: .75rem 1rem; }
}
