/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BODY ===== */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f4f7fc;
    color: #333;
	display: flex;
    flex-direction: column;
}

/* ===== LAYOUT ===== */
.main-content {
    margin-left: 240px;
    padding: 20px;
	padding-top: 100px;
	flex: 1;
}

h1{
	color: #F33538;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #003366;
    color: white;
    padding: 15px 20px;
	position: fixed;
	width: 100%;
	z-index: 1000;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 240px;
    height: 100vh;
    position: fixed;
    background: #102542;
    color: white;
	z-index: 999;
	padding-top: 100px;
}

.sidebar a {
    display: block;
    padding: 14px 20px;
    color: white;
    text-decoration: none;
}

.sidebar a:hover {
    background: #1d3557;
}

/* ===== CARDS ===== */
.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* ===== GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background: #003366;
    color: white;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

/* ===== FORMS ===== */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

button {
    background: #E81A1E;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
	margin-top: 5px;
	margin-bottom: 5px;
}

button:hover {
    background: #002244;
}

/* ===== ALERTS ===== */
.success-box {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.error-box {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
}

/* ===== LOGIN PORTAL ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-form {
    background: white;
    padding: 40px;
    width: 350px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* =========================
   HAMBURGER BUTTON
========================= */
.menu-toggle {
    font-size: 22px;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
}

footer{
	width: 100%;
	height: auto;
	align-content: center;
	background: #D8D8D8;
	text-align: center;
	margin-top: auto;
	font-size: 12px;
}


.sidebar {
    transition: 0.3s ease;
}

/* =========================
   MOBILE SIDEBAR (HIDDEN)
========================= */
@media (max-width: 768px) {
	.menu-toggle {
        display: block;
		position: absolute;
		right: 10px;
		top: 10px;
		width: auto !important;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
    
    .login-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    .login-form {
        background: white;
        padding: 40px;
        width: 500px;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
}

/* ========================= */
/* 📱 MOBILE RESPONSIVE PART */
/* ========================= */

@media (max-width: 1024px) {

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
		padding-top: 100px;
    }
    
    .login-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    .login-form {
        background: white;
        padding: 40px;
        width: 80%;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

}

@media (max-width: 768px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        text-align: center;
		z-index: 1000;
    }

    /* TABLE SCROLL */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* STACK FORMS */
    .form-grid {
        display: block;
    }

    button {
        width: 100%;
    }
    
    .login-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    .login-form {
        background: white;
        padding: 40px;
        width: 80%;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
}

@media (max-width: 480px) {

    body {
        font-size: 14px;
    }

    .card {
        padding: 15px;
    }

    th, td {
        padding: 8px;
    }

    .sidebar a {
        padding: 10px;
        font-size: 14px;
    }
    
    .login-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }
    
    .login-form {
        background: white;
        padding: 40px;
        width: 80%;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
}