/* =========================================
   1. COLOR PALETTE & BASICS
   ========================================= */
:root {
    --primary: #4361ee;      /* Bright Blue for Buttons/Links */
    --secondary: #3f37c9;    /* Darker Blue for Hover */
    --accent: #4895ef;       /* Light Blue */
    --bg-color: #f4f7fa;     /* Light Grey Background */
    --text-dark: #2b2d42;    /* Dark Text */
    --text-light: #8d99ae;   /* Grey Text */
    --white: #ffffff;
    --danger: #ef476f;       /* Red for Delete */
    --success: #06d6a0;      /* Green for Success */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Soft Shadow */
}

body {
    font-family: 'Poppins', sans-serif; /* We will load this font later */
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3 { margin-top: 0; font-weight: 600; color: var(--text-dark); }
a { text-decoration: none; color: var(--primary); font-weight: 500; }

/* =========================================
   2. NAVBAR (Top Bar)
   ========================================= */
.navbar {
    background: var(--text-dark);
    color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 100;
}

.navbar h1 { margin: 0; font-size: 20px; color: var(--white); }

/* The "Back to Dashboard" Button */
.btn-back {
    background: rgba(255,255,255,0.15);
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    transition: 0.3s;
}
.btn-back:hover { background: rgba(255,255,255,0.3); }

/* =========================================
   3. LAYOUT & CARDS
   ========================================= */
.container, .admin-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* The White Boxes */
.card, .section-box, .section-container {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
}

/* Grid for Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Card Hover Effect */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: 0.3s ease;
}

/* =========================================
   4. FORMS & INPUTS
   ========================================= */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px 0;
    display: inline-block;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    background: #fdfdfd;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* =========================================
   5. BUTTONS
   ========================================= */
button, .btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.3s;
    text-align: center;
}

button:hover, .btn:hover { background-color: var(--secondary); }

/* Different Button Colors */
.btn-del, .btn-danger { background-color: var(--danger) !important; }
.btn-success { background-color: var(--success) !important; }
.btn-small { padding: 6px 12px; font-size: 12px; }

/* =========================================
   6. TABLES
   ========================================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th, td { padding: 15px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background-color: #f8f9fa; font-weight: 600; color: var(--text-dark); }

/* =========================================
   7. LOGIN PAGE SPECIFIC STYLES
   ========================================= */
.login-body {
    /* This centers the box vertically and horizontally */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-color);
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px; /* Prevents stretching on wide screens */
    text-align: center;
}

.login-logo {
    width: 120px; /* Adjust size of logo */
    margin-bottom: 20px;
    object-fit: contain;
}

.login-header {
    margin-bottom: 30px;
    color: var(--text-dark);
}

.login-card input {
    background: #f8f9fa;
    border: 1px solid #eee;
}

.login-card button {
    width: 100%; /* Make button fill the box */
    margin-top: 10px;
    font-size: 16px;
    font-weight: 600;
}