/* c:\xampp\htdocs\avira\assets\css\style.css */
:root {
    --primary-color: #053736;
    /* Deep Teal */
    --accent-color: #D2B269;
    /* Gold */
    --hover-color: #000000;
    /* Black */
    --bg-color: #FFFFFF;
    /* White */
    --text-color: #333333;
    --border-color: #e0e0e0;
    --card-bg: #fdfdfd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.sidebar ul {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar ul li a {
    display: block;
    padding: 15px 25px;
    color: #ddd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f8;
    /* Slight off-white to make cards pop */
}

/* Header Navbar */
.top-header {
    background-color: var(--primary-color);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-header .user-info {
    font-size: 0.9rem;
}

.top-header a.logout {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.top-header a.logout:hover {
    color: #fff;
}

/* Content Container */
.container {
    padding: 30px;
    flex-grow: 1;
}

/* Cards (Glassmorphism inspired light cards) */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--hover-color);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--hover-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
}

table tr:hover td {
    background-color: rgba(5, 55, 54, 0.05);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.responsive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(210, 178, 105, 0.2);
}

/* Auth Page specific */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--primary-color);
    width: 100%;
}

.auth-box {
    background-color: var(--bg-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.auth-box .btn {
    width: 100%;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: column;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .sidebar .brand {
        padding: 15px 20px;
    }
    
    .sidebar ul {
        display: none;
        flex-direction: column;
        padding: 0;
        margin: 0;
        background: rgba(0,0,0,0.15);
        width: 100%;
    }
    
    .sidebar ul.show {
        display: flex;
    }
    
    .sidebar ul li {
        width: 100%;
    }
    
    .sidebar ul li a {
        padding: 15px 20px;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-left: none;
        white-space: normal;
    }
    
    .sidebar ul li a.active, .sidebar ul li a:hover {
        border-left: none;
        border-bottom: 1px solid var(--accent-color);
        background: rgba(255,255,255,0.05);
    }
    
    .top-header {
        padding: 0 15px;
        flex-direction: column;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    /* Responsive Grids */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .responsive-grid {
        grid-template-columns: 1fr !important;
    }
    
    form[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
    form[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .form-group {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .btn {
        width: 100% !important;
        margin-top: 10px !important;
        text-align: center;
        justify-content: center;
    }
    
    /* True Responsive Card-Style Tables */
    .card {
        padding: 10px;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .card-header, form {
        background: #fff;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }
    table {
        border: none !important;
    }
    table thead {
        display: none;
    }
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    table tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        border: 1px solid var(--border-color);
        padding: 5px;
    }
    table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right !important;
        border: none !important;
        border-bottom: 1px solid #f0f0f0 !important;
        padding: 12px 10px !important;
    }
    table td:last-child {
        border-bottom: none !important;
    }
    table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        text-align: left;
        margin-right: 15px;
    }
}