/* -------------------------------------------------------
   GLOBAL RESET + BASE STYLE
--------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* -------------------------------------------------------
   LAYOUT: SIDEBAR & CONTENT
--------------------------------------------------------*/
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #1e293b;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 20px;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #cbd5e1;
    transition: .2s;
}

.sidebar a:hover,
.sidebar a.active {
    background: #334155;
    color: #fff;
}

.content {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 30px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar h2 {
        display: none;
    }
    .sidebar a {
        padding: 12px 10px;
        font-size: 14px;
        text-align: center;
    }
    .content {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
}

/* -------------------------------------------------------
   TOPBAR
--------------------------------------------------------*/
.topbar {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar .user {
    font-weight: 600;
}

/* -------------------------------------------------------
   CARDS
--------------------------------------------------------*/
.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
}

/* -------------------------------------------------------
   TABLES
--------------------------------------------------------*/
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table thead {
    background: #1e293b;
    color: #fff;
}

table th,
table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}

table tbody tr:hover {
    background: #f1f5f9;
}

/* -------------------------------------------------------
   BUTTONS
--------------------------------------------------------*/
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
}

/* -------------------------------------------------------
   FORMS
--------------------------------------------------------*/
input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 15px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 20px;
}

/* -------------------------------------------------------
   LOGIN PAGE
--------------------------------------------------------*/
.auth-container {
    max-width: 450px;
    background: #fff;
    margin: 80px auto;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgb(0 0 0 / 10%);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
}

/* -------------------------------------------------------
   ALERTS
--------------------------------------------------------*/
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* -------------------------------------------------------
   CERTIFICATES DOWNLOAD BOX
--------------------------------------------------------*/
.certificate-box {
    background: #fff;
    padding: 20px;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* -------------------------------------------------------
   DASHBOARD SUMMARY STATS
--------------------------------------------------------*/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-box {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 10%);
    text-align: center;
}

.stat-box h2 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-box p {
    font-size: 14px;
    opacity: 0.7;
}
