/* ========================= */
/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fb;
    color: #2c3e50;
    overflow-x: hidden;
}

/* ========================= */
/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar .logo { font-weight:600; font-size:20px; }

.nav-right a { 
    color:#fff; 
    text-decoration:none; 
    margin-left:15px; 
}

/* ========================= */
/* Hamburger Button */
.hamburger {
    display: flex; /* Always visible */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 2500;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* ========================= */
/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 220px;
    height: calc(100% - 60px);
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 10px;
    overflow-y: auto;
    transform: translateX(-220px); /* hidden by default */
    transition: transform 0.3s ease;
    z-index: 1500;
}

.sidebar.active {
    transform: translateX(0); /* slide in */
}

.sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.sidebar a:hover {
    background-color: #3498db;
}

.dropdown-sidebar > span {
    display: block;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 5px;
}

.dropdown-sidebar .dropdown-content {
    display: none;
    padding-left: 15px;
}

.dropdown-sidebar:hover .dropdown-content {
    display: block;
}

/* ========================= */
/* Main Content / Dashboard */
.main-content, .dashboard {
    margin-top: 60px;
    margin-left: 0;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.main-content.shifted,
.dashboard.shifted {
    margin-left: 220px; /* shift content when sidebar is active */
}

/* ========================= */
/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-card img {
    width: 150px;
    height: 150px;
    margin-bottom: 12px;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.card-title {
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
}

/* ========================= */
/* Buttons */
button, .btn, .logout-link {
    background-color: #2c3e50; /* same as navbar */
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

button:hover, .btn:hover, .logout-link:hover {
    background-color: #3498db;
}

/* ========================= */
/* Forms */
input[type="text"], input[type="password"], input[type="email"], textarea, select {
    width: 100%;
    padding: 8px 10px;
    margin: 5px 0 15px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

/* ========================= */
/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

table th {
    background-color: #2c3e50;
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ========================= */
/* Auth Pages Card Center */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 20px;
}

.auth-card input {
    margin-bottom: 15px;
}

.auth-card .logo {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

/* ========================= */
/* Responsive Styles */
@media (max-width: 1024px) {
    .hamburger {
        display: flex; /* Hamburger menu visible on tablet/laptop */
    }

    .main-content, .dashboard {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .dashboard-card img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================= */
/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
