/* Custom Global CSS Setup */
:root {
    --bg-main: #121214;
    --bg-surface: #1a1a1e;
    --bg-nav: #0d0d0f;
    --accent: #ffcc00;
    --text-primary: #f5f5f7;
    --text-muted: #a0a0a5;
    --border-color: #2a2a30;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 70px;    /* Space for permanent top header */
    padding-bottom: 80px; /* Space for permanent bottom footer */
}

/* Permanent Nav Menu Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
}

header .logo {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.3rem;
    letter-spacing: 1px;
}

header nav a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

header nav a:hover {
    color: var(--accent);
}

/* Permanent Screen Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--bg-nav);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
}

footer .copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer .footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

footer .footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

footer .footer-links a:hover {
    color: var(--accent);
}

/* Container Structure */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Layout for Images with Modern Faded Edges */
.profile-frame {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 20px auto;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
    /* Soft faded-edges vignette element mask */
    mask-image: radial-gradient(circle, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
}

/* Dynamic Cards & Layout Boxes */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.accent-heading {
    color: var(--accent);
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

/* Admin Form Controls styling */
.admin-control-box {
    background: #25252b;
    border: 2px dashed var(--accent);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-weight: 600;
}

.form-control {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    background-color: var(--accent);
    color: #121214;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn:hover {
    background-color: #e6b800;
}

code, pre {
    font-family: 'Courier New', Courier, monospace;
    background-color: #0d0d0f;
    color: #a8ff60;
    padding: 4px 8px;
    border-radius: 4px;
}

pre {
    padding: 15px;
    overflow-x: auto;
    display: block;
    margin-top: 10px;
}

/* GRID SETUP FOR HOME LAB EQUIPMENT */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.lab-item {
    background: #1e1e24;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

/* ==========================================================================
   4. INK-SAVING PRINT STYLESHEET MEDIA QUERY (CRITICAL FOR HIGH QUALITY PDF)
   ========================================================================== */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        font-size: 12pt;
    }

    header, footer, .admin-control-box, .no-print, .btn, form {
        display: none !important; /* Hides web menus, headers, and dashboard widgets */
    }

    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 25px !important;
        page-break-inside: avoid;
    }

    .accent-heading {
        color: #000000 !important;
        border-left: 4px solid #000000 !important;
        margin-top: 15px;
    }

    code, pre {
        background: #f5f5f5 !important;
        color: #000000 !important;
        border: 1px solid #ccc !important;
    }
}