
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f1f5fb;
    color: #24344d;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(130deg,#12345a,#0879df);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 35px #0003;
}

.admin-logo {
    font-size: 55px;
}

.login-card h1 {
    color: #12345a;
    font-size: 22px;
}

.login-card p {
    color: #718096;
    margin-bottom: 20px;
}

.login-card form {
    text-align: left;
}

.login-card label,
.form-box label {
    display: block;
    font-weight: bold;
    margin: 15px 0 6px;
}

.login-card input,
.form-box input,
.form-box select,
.form-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d5dfeb;
    border-radius: 7px;
    outline: none;
    background: white;
}

.form-box textarea {
    min-height: 100px;
    resize: vertical;
}

.login-card button,
.form-box button,
.search-form button {
    background: #0879df;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
}

.login-card button {
    width: 100%;
    margin: 25px 0;
}

.login-card a {
    color: #0879df;
}

/* ADMIN DASHBOARD */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #12345a;
    color: white;
    padding: 25px 15px;
}

.sidebar h2 {
    font-size: 21px;
}

.sidebar-sub {
    color: #b9d1ee;
    font-size: 11px;
    margin-bottom: 30px;
}

.sidebar > a {
    display: block;
    padding: 13px;
    color: white;
    border-radius: 7px;
    margin-bottom: 7px;
}

.sidebar > a:hover,
.sidebar > a.active {
    background: #0879df;
}

.sidebar form {
    margin-top: 20px;
}

.sidebar-logout {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 7px;
    background: #e94c4c;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 25px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: white;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.topbar h2 {
    color: #12345a;
}

.welcome-admin {
    background: linear-gradient(120deg,#12345a,#0879df);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 3px 12px #00000008;
}

.stat-card span {
    font-size: 32px;
}

.stat-card h3 {
    font-size: 30px;
    color: #0879df;
}

.stat-card p {
    color: #718096;
}

/* GENERAL PAGES */

.page-container {
    width: 94%;
    max-width: 1250px;
    margin: 30px auto;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.page-heading h1 {
    color: #12345a;
    font-size: 27px;
}

.page-heading a,
.action-link {
    color: #0879df;
    font-weight: bold;
}

.management-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.management-links a {
    background: #12345a;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
}

.form-box,
.table-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px #00000008;
}

.form-box h2,
.table-box h2 {
    color: #12345a;
    margin-bottom: 15px;
}

.form-box button {
    margin-top: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #d5dfeb;
    border-radius: 7px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

th, td {
    padding: 13px;
    text-align: left;
    border-bottom: 1px solid #e8edf4;
    font-size: 14px;
}

th {
    background: #edf5ff;
    color: #12345a;
}

td small {
    display: block;
    color: #718096;
}

td form {
    display: flex;
    gap: 5px;
    align-items: center;
}

td select {
    max-width: 100px;
    padding: 6px;
}

td button {
    padding: 7px 10px;
    border: 0;
    background: #0879df;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.delete-btn {
    background: #e44747 !important;
}

.message {
    padding: 12px;
    margin-bottom: 18px;
    border-radius: 7px;
}

.success {
    background: #dcfce7;
    color: #166534;
}

.error {
    background: #fee2e2;
    color: #991b1b;
}

@media(max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width: 550px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 12px;
    }

    .form-box,
    .table-box {
        padding: 15px;
    }

    .search-form {
        flex-direction: column;
    }

    .page-heading h1 {
        font-size: 22px;
    }
}
