/* MHK Smart Campus Portal v3.0 Styles */
:root {
    --mhk-primary: #1e3a8a;
    --mhk-primary-light: #eff6ff;
    --mhk-accent: #0f766e;
    --mhk-danger: #b91c1c;
    --mhk-warning: #b45309;
    --mhk-border: #cbd5e1;
    --mhk-bg: #f8fafc;
    --mhk-text: #0f172a;
}

.mhk-wrap {
    max-width: 1240px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--mhk-text);
}

.mhk-header-bar {
    background: linear-gradient(135deg, var(--mhk-primary), #0f172a);
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.mhk-header-bar h1 {
    color: #ffffff;
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
}

.mhk-header-bar p {
    margin: 0;
    opacity: 0.9;
    font-size: 13px;
}

.mhk-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.mhk-badge-active { background: #dcfce7; color: #166534; }
.mhk-badge-warn { background: #fef3c7; color: #92400e; }
.mhk-badge-expired { background: #fee2e2; color: #991b1b; }

.mhk-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--mhk-border);
    padding-bottom: 10px;
}

.mhk-nav-tab {
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid var(--mhk-border);
    border-radius: 7px;
    text-decoration: none;
    color: var(--mhk-text);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.15s ease;
}

.mhk-nav-tab:hover {
    background: var(--mhk-primary-light);
    color: var(--mhk-primary);
}

.mhk-nav-tab.active {
    background: var(--mhk-primary);
    color: #ffffff;
    border-color: var(--mhk-primary);
}

.mhk-card {
    background: #ffffff;
    border: 1px solid var(--mhk-border);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.mhk-card h2, .mhk-card h3 {
    margin-top: 0;
    color: var(--mhk-primary);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.mhk-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.mhk-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.mhk-form-group {
    margin-bottom: 14px;
}

.mhk-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: #334155;
}

.mhk-input, .mhk-select, .mhk-textarea {
    width: 100%;
    max-width: 100%;
    padding: 8px 11px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.mhk-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}

.mhk-btn:hover { opacity: 0.92; }
.mhk-btn-primary { background: var(--mhk-primary); color: #ffffff; }
.mhk-btn-success { background: #15803d; color: #ffffff; }
.mhk-btn-danger { background: var(--mhk-danger); color: #ffffff; }
.mhk-btn-secondary { background: #475569; color: #ffffff; }

.mhk-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.mhk-table th, .mhk-table td {
    border: 1px solid var(--mhk-border);
    padding: 9px 10px;
    text-align: left;
}

.mhk-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
}

.mhk-table tr:nth-child(even) {
    background: #f8fafc;
}

.mhk-alert {
    padding: 12px 16px;
    border-radius: 7px;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 14px;
}
.mhk-alert-success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.mhk-alert-error { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.mhk-alert-warn { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }

/* Lock Screen */
.mhk-lock-box {
    max-width: 560px;
    margin: 40px auto;
    background: #ffffff;
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.12);
}

/* Printable Marksheet & Admit Card */
.mhk-print-sheet {
    background: #ffffff;
    border: 2px solid #0f172a;
    padding: 28px;
    max-width: 820px;
    margin: 15px auto;
    position: relative;
    overflow: hidden;
    color: #000000;
}

.mhk-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    max-width: 340px;
    pointer-events: none;
    z-index: 0;
}

.mhk-sheet-content {
    position: relative;
    z-index: 1;
}

.mhk-sheet-header {
    text-align: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.mhk-sheet-header h2 {
    margin: 0;
    font-size: 24px;
    color: #000000;
    border: none;
    padding: 0;
    text-transform: uppercase;
}

.mhk-sign-row {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 8px;
}

.mhk-sign-box {
    border-top: 1px solid #000000;
    padding-top: 5px;
    min-width: 170px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
}

/* Frontend Portal */
.mhk-frontend-container {
    max-width: 960px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media print {
    body * { visibility: hidden; }
    #mhk-printable-area, #mhk-printable-area * { visibility: visible; }
    #mhk-printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: 2px solid #000 !important;
        box-shadow: none !important;
    }
    .no-print { display: none !important; }
}
