/* ==========================
   Global Styles
   ========================== */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8; /* Page background */
}

.dashboard {
    display: flex; /* Sidebar + main content side by side */
    height: 100vh; /* Full height viewport */
}

/* ==========================
   Sidebar company logo & alignment
   ========================== */
.company-logo {
    width: 250px;       /* Bigger logo */
    height: auto;       /* Maintain aspect ratio */
    object-fit: contain;
    display: block;
    margin-top: -60px;
    margin-bottom: -75px;
    margin-left:-25px;
}


/* ==========================
   Sidebar Styles
   ========================== */
.sidebar {
    width: 200px; /* Sidebar width */
    background-color: #140222; /* Purple primary color */
    color: #fff;
    display: flex;
    flex-direction: column; /* Stack links vertically */
    padding: 20px;
}

/* Navigation links */
.sidebar a {
    text-decoration: none; /* Remove underline */
    color: #fff; /* White text */
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px; /* Rounded edges */
    transition: all 0.3s; /* Smooth hover/active transitions */
    font-size: 0.9rem; /* Slightly smaller font size */
    display: flex;
    align-items: center;
}

.sidebar a i {
    margin-right: 10px; /* Space between icon and text */
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Hover effect on links */
.sidebar a:hover {
    background-color: #291a29; /* Slightly darker purple */
}

/* Active tab highlight */
.sidebar a.active {
    background: linear-gradient(to right, #50c878, #008080); /* Emerald to teal gradient */
    color: #fff;
}

/* ==========================
   Sidebar Divider Line
   ========================== */
.sidebar .divider {
    height: 1px;
    background-color: #f2f1f2; /* Slightly lighter/darker purple line */
    margin: 15px 0; /* Space above and below */
    border-radius: 2px;
}

/* ==========================
   Logout Button
   ========================== */
.sidebar .logout-btn {
    margin-top: auto; /* Push to bottom of sidebar */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    background-color: #300830; /* Matches hover color */
    transition: background 0.3s, transform 0.2s;
}

.sidebar .logout-btn i {
    font-size: 1.1rem;
}

/* Hover effect for logout */
.sidebar .logout-btn:hover {
    background: rgb(13, 2, 25); /* Emerald to teal */
    transform: translateY(-2px);
}

/* ==========================
   Main Content Styles
   ========================== */
.main-content {
    flex: 1; /* Take remaining space */
    background-color: #fff;
    padding: 30px;
    overflow-y: auto;
}

/* ==========================
   Main Content Styles (Same as Home Page)
   ========================== */
.main-content {
    flex: 1; /* Take remaining space */
    background-color: #fff; /* White background for content */
    padding: 30px;
    overflow-y: auto; /* Scroll if content overflows */
}

.main-header {
    margin-top: 20px;
    display: flex;
    justify-content: space-between; /* Left title/welcome, right date */
    align-items: flex-start;
    flex-wrap: wrap; /* For responsiveness on smaller screens */
    margin-bottom: 20px;
}

.main-header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.main-header-left h1 {
    font-size: 2.7rem; /* Big title */
    font-weight: bold;
    color: #090a0c;
    margin: 0;
}

.main-header-left p {
    font-size: 1rem;
    font-weight: 480;
    color: #555;
    margin: 0;
}

/* Date / last updated on the right */
.main-header-right {
    font-size: 0.9rem;
    color: #777;
    white-space: nowrap; /* Prevent wrapping */
    margin-bottom: 10px;
}


/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.main-header-left h1 { margin-bottom:5px; }
.main-header-left p { color:#555; font-size:0.95rem; }
.main-header-right p { color:#555; font-size:0.9rem; }

/* Stats Cards */
.admin-stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.stat-icon { font-size:2.5rem; color:#1b1c1c; margin-bottom:10px; }
.stat-num { font-size:3.2rem; font-weight:bold; color:#140222; margin-bottom:5px; }
.stat-label { font-size:1.2rem; color:#555; }
.stats-description { font-size:0.85rem; color:#777; margin-bottom:25px; }

/* Admin Sections */
.admin-section {
    background:#fff;
    border-radius:14px;
    padding:20px;
    margin-bottom:25px;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
}

.admin-section h3 { margin-top:0; color:#140222; margin-bottom:10px; }
.admin-btn { margin-right: 10px; float:right; margin-bottom:15px; background:linear-gradient(to right,#50c878,#008080); color:#fff; border:none; padding:8px 14px; border-radius:8px; cursor:pointer; }
.admin-btn:hover { opacity:0.9; }

/* Tables */
.user-table { width:100%; border-collapse:collapse; margin-top:10px; }
.user-table th, .user-table td { padding:10px; border-bottom:1px solid #eee; text-align:left; }
.user-table th { background:#140222; color:#fff; }

.btn.ghost { background:none; border:1px solid #008080; color:#008080; padding:5px 10px; border-radius:5px; cursor:pointer; margin-right:5px; }
.btn.ghost:hover { background:#008080; color:#fff; }
.btn.ghost.danger { border:1px solid #e74c3c; color:#e74c3c; }
.btn.ghost.danger:hover { background:#e74c3c; color:#fff; }

/* Responsive */
@media (max-width: 900px){
    .admin-stats-grid { flex-direction: column; }
    .main-header { flex-direction: column; align-items:flex-start; }
    .admin-btn { float:none; margin-bottom:20px; }
}
