/* Custom CSS for Admin on top of main variables */
body {
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* Login View */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}
.login-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85); /* Slate 900 overlay */
}
.login-box {
    position: relative;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    text-align: center;
}
.login-box h2 {
    color: var(--primary);
    margin-bottom: 2rem;
}
.login-box input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: white;
}

.hidden { display: none !important; }

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}
.sidebar {
    width: 250px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}
.sidebar .logo {
    padding: 0 2rem 2rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
}
.sidebar-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--bg-color);
    color: var(--primary);
    border-left-color: var(--primary);
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.admin-table th {
    background: rgba(0,0,0,0.2);
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.admin-table td img.tiny-logo {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.btn-action {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 0.5rem;
    transition: color 0.3s;
}
.btn-action.edit:hover { color: #3b82f6; }
.btn-action.delete:hover { color: #ef4444; }

/* Stats Cards Hover */
.stat-card { transition: transform 0.2s, box-shadow 0.2s; cursor: default; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.3); }

/* Chart containers - prevent infinite vertical growth */
#viewStats canvas {
    max-height: 260px !important;
    width: 100% !important;
}

/* ===== DIFF VIEW STYLES ===== */
.diff-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.diff-section {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-left: 3px solid #fbbf24;
}
.diff-section-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.diff-row {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.85rem;
}
.diff-row:last-child { border-bottom: none; }
.diff-row strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.2rem;
}
.diff-old {
    color: #f87171;
    font-size: 0.85rem;
    text-decoration: line-through;
}
.diff-new {
    color: #4ade80;
    font-size: 0.85rem;
}
.diff-added {
    color: #4ade80;
    font-size: 0.85rem;
    padding: 0.15rem 0;
}
.diff-removed {
    color: #f87171;
    font-size: 0.85rem;
    text-decoration: line-through;
    padding: 0.15rem 0;
}
.diff-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.diff-gallery-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}
.diff-gallery-item.added {
    border-color: #4ade80;
}
.diff-gallery-item.removed {
    border-color: #f87171;
    opacity: 0.6;
}
.diff-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.diff-gallery-item .badge-added,
.diff-gallery-item .badge-removed {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 0.6rem;
    text-align: center;
    padding: 2px 0;
    font-weight: bold;
    text-decoration: none;
}
.diff-gallery-item .badge-added {
    background: rgba(74, 222, 128, 0.85);
    color: #000;
}
.diff-gallery-item .badge-removed {
    background: rgba(248, 113, 113, 0.85);
    color: #fff;
}
