/* ============================================================
   Party-Vermietung – Admin Panel Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary:     #FF4757;
    --primary-dk:  #c0392b;
    --sidebar-bg:  #1E2235;
    --sidebar-w:   250px;
    --sidebar-txt: rgba(255,255,255,.7);
    --sidebar-act: rgba(255,255,255,.12);
    --accent:      #FFA502;
    --success:     #2ed573;
    --warning:     #ffa502;
    --danger:      #FF4757;
    --info:        #1e90ff;
    --white:       #FFFFFF;
    --light:       #F4F6FA;
    --border:      #E8ECF0;
    --text:        #2F3542;
    --text-lt:     #8792A2;
    --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
    --shadow:      0 4px 20px rgba(0,0,0,.1);
    --radius:      10px;
    --radius-sm:   6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'Poppins', sans-serif; background: var(--light); color: var(--text); }
a { text-decoration: none; color: var(--primary); }
img { max-width: 100%; display: block; }

/* ---- Layout ---- */
.admin-wrap { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w); background: var(--sidebar-bg);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh;
    z-index: 200; transition: transform .3s ease;
    overflow-y: auto;
}
.sidebar-logo {
    padding: 1.5rem 1.25rem; display: flex; align-items: center; gap: .6rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo .logo-icon {
    width: 38px; height: 38px; background: var(--primary);
    border-radius: 8px; display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0;
}
.sidebar-logo .logo-text { color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.sidebar-logo .logo-text small { display: block; color: rgba(255,255,255,.4); font-size: .7rem; font-weight: 400; }

.sidebar-nav { padding: 1rem 0; flex: 1; }
.nav-group-label {
    padding: .75rem 1.25rem .3rem;
    font-size: .65rem; font-weight: 700; letter-spacing: .1em;
    color: rgba(255,255,255,.3); text-transform: uppercase;
}
.sidebar-nav a {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1.25rem; color: var(--sidebar-txt);
    font-size: .88rem; font-weight: 500; transition: all .2s;
    border-left: 3px solid transparent;
}
.sidebar-nav a .nav-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-nav a:hover { background: var(--sidebar-act); color: #fff; }
.sidebar-nav a.active { background: var(--sidebar-act); color: #fff; border-left-color: var(--primary); }

.sidebar-footer {
    padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.06);
    font-size: .8rem; color: rgba(255,255,255,.4);
}
.sidebar-footer a { color: rgba(255,255,255,.5); }
.sidebar-footer a:hover { color: #fff; }
.sidebar-footer .user-info { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.sidebar-footer .user-avatar {
    width: 32px; height: 32px; background: var(--primary); border-radius: 50%;
    display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ---- Main Content ---- */
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0 1.5rem; height: 60px; display: flex; align-items: center;
    justify-content: space-between; position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.topbar-title { font-weight: 700; font-size: 1rem; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-back { font-size: .85rem; color: var(--text-lt); }
.topbar-back:hover { color: var(--text); }

.hamburger-admin {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: .3rem;
}
.hamburger-admin span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

.admin-content { padding: 2rem 1.5rem; flex: 1; }
.admin-content-header { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.admin-content-header h1 { font-size: 1.35rem; }

/* ---- Cards ---- */
.card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: .95rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: var(--light); }

/* ---- Stats ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--white); border-radius: var(--radius); padding: 1.25rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border); display: flex; align-items: center; gap: 1rem;
}
.stat-icon { width: 50px; height: 50px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-icon.orange { background: rgba(255,71,87,.1); }
.stat-icon.blue   { background: rgba(30,144,255,.1); }
.stat-icon.green  { background: rgba(46,213,115,.1); }
.stat-icon.yellow { background: rgba(255,165,2,.1); }
.stat-info .num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat-info .lbl { font-size: .78rem; color: var(--text-lt); margin-top: .2rem; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    background: var(--light); padding: .75rem 1rem;
    text-align: left; font-size: .78rem; font-weight: 700;
    color: var(--text-lt); text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(0,0,0,.01); }
.admin-table .actions { display: flex; gap: .4rem; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .6rem 1.25rem; border-radius: var(--radius-sm);
    font-family: inherit; font-size: .855rem; font-weight: 600;
    cursor: pointer; border: none; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); color: #fff; }
.btn-secondary { background: var(--light); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #25b85a; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--primary-dk); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #e09000; color: #fff; }
.btn-info    { background: var(--info); color: #fff; }
.btn-info:hover { background: #1a7fd6; color: #fff; }
.btn-sm { padding: .4rem .85rem; font-size: .78rem; }
.btn-xs { padding: .25rem .6rem; font-size: .72rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .83rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.form-group label .required { color: var(--danger); }
.form-control {
    width: 100%; padding: .6rem .9rem; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: inherit; font-size: .88rem;
    color: var(--text); background: var(--white); outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,71,87,.08); }
.form-text { font-size: .75rem; color: var(--text-lt); margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.form-check label { font-size: .88rem; cursor: pointer; margin: 0; }

/* ---- Alerts ---- */
.alert { padding: .875rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .875rem; }
.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; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ---- Badges ---- */
.badge {
    display: inline-block; padding: .2rem .55rem; border-radius: 50px;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.badge-success { background: rgba(46,213,115,.15); color: #1a9e50; }
.badge-danger  { background: rgba(255,71,87,.12);  color: var(--danger); }
.badge-warning { background: rgba(255,165,2,.15);  color: #8a6000; }
.badge-info    { background: rgba(30,144,255,.12); color: #0070d6; }
.badge-secondary { background: var(--light); color: var(--text-lt); }

/* ---- Upload area ---- */
.upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 2rem; text-align: center; cursor: pointer;
    transition: all .2s; background: var(--light);
}
.upload-area:hover { border-color: var(--primary); background: rgba(255,71,87,.03); }
.upload-preview { max-width: 160px; max-height: 120px; border-radius: var(--radius-sm); margin: .75rem auto 0; object-fit: cover; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: .3rem; align-items: center; margin-top: 1rem; }
.pagination a, .pagination span {
    padding: .4rem .75rem; border-radius: var(--radius-sm); font-size: .82rem;
    border: 1px solid var(--border); color: var(--text);
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* ---- Item thumb in table ---- */
.item-thumb {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    object-fit: cover; background: var(--light); display: grid; place-items: center; font-size: 1.2rem;
}
.item-thumb-wrap { display: flex; align-items: center; gap: .75rem; }

/* ---- Status indicator ---- */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; }
.status-dot.green  { background: var(--success); }
.status-dot.orange { background: var(--warning); }
.status-dot.red    { background: var(--danger); }
.status-dot.gray   { background: var(--text-lt); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .hamburger-admin { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .admin-content { padding: 1rem; }
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.text-muted { color: var(--text-lt) !important; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.flex-1 { flex: 1; }
.w-100 { width: 100%; }
.small { font-size: .78rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-lt); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
