/* 
===================================================
Project: Aurora Coffee - Admin Panel CSS
Description: Styles for the Backend Interface
===================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --admin-bg: #f4f6f9;
    --sidebar-bg: #212529;
    --sidebar-hover: #343a40;
    --sidebar-text: #c2c7d0;
    --header-bg: #ffffff;
    --text-main: #333333;
    --text-light: #6c757d;
    --primary: #af8f6f;
    /* Brand accent */
    --primary-hover: #96785a;
    --danger: #dc3545;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --border: #e9ecef;
    --radius: 6px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--admin-bg);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    outline: none;
}

ul {
    list-style: none;
}

/* ======== LOGIN PAGE ======== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
}

.login-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-card .logo {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    display: block;
}

.login-card .logo span {
    color: var(--primary);
}

.login-card form {
    text-align: left;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

.login-card .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    background: #fbfbfb;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(175, 143, 111, 0.2);
}

.login-card .btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius);
    font-size: 1rem;
    margin-top: 10px;
    transition: var(--transition);
}

.login-card .btn:hover {
    background: var(--primary-hover);
}

.login-options {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: 15px;
}

/* ======== LAYOUT ======== */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sidebar-header h2 {
    color: white;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.sidebar-header h2 span {
    color: var(--primary);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-top: 20px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #555;
}

.menu-label {
    padding: 10px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: var(--sidebar-hover);
    color: white;
    border-left-color: var(--primary);
}

.sidebar-menu li a i {
    width: 25px;
    font-size: 1.1rem;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    min-width: 0;
}

.top-header {
    background: var(--header-bg);
    height: 60px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-left .toggle-btn {
    background: transparent;
    font-size: 1.2rem;
    color: var(--text-main);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.admin-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-profile span {
    font-weight: 500;
    font-size: 0.9rem;
}

.page-content {
    padding: 30px;
    flex: 1;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title h1 {
    font-size: 1.5rem;
    color: var(--text-main);
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary);
}

/* ======== COMPONENTS ======== */
/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(175, 143, 111, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.blue {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

.stat-icon.green {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.stat-icon.red {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* Tables */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 20px;
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th,
.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.02);
}

.table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: #f4f4f4;
    color: var(--text-main);
}

.btn-action:hover {
    background: #e0e0e0;
}

.btn-action.edit:hover {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

.btn-action.delete:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* Charts Area Placeholder */
.chart-container {
    height: 300px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: var(--radius);
    color: #999;
}

/* Responsive */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}