﻿/* GENERAL */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f7f6;
}

/* MASTERPAGE */
.sidebar {
    width: 250px;
    background: #1b263b;
    height: 100vh;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 25px 20px;
    font-size: 1.4em;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 1px solid #2c3e50;
    color: #e0e1dd;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .nav-menu li a {
        padding: 15px 20px;
        display: block;
        color: #adb5bd;
        text-decoration: none;
        transition: 0.3s;
        border-left: 4px solid transparent;
    }

        .nav-menu li a:hover {
            background: #415a77;
            color: white;
            border-left: 4px solid #778da9;
        }

.user-name-link {
    color: #e0e1dd;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

    .user-name-link:hover {
        color: #e63946;
    }
/* REGISTRATION */
.user-info {
    position: absolute;
    bottom: 0;
    padding: 20px;
    width: 100%;
    background: #0d1b2a;
    font-size: 0.9em;
    box-sizing: border-box;
    color:white;
}

.main-content {
    margin-left: 250px; /* MUST MATCH SIDEBAR WIDTH */
    padding: 40px;
    min-height: 100vh;
    box-sizing: border-box;
}

.form-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group label {
        font-size: 0.85em;
        margin-bottom: 5px;
        color: #666;
    }

.form-control {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.grid-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gv-style {
    width: 100%;
    border-collapse: collapse;
}

    .gv-style th {
        background: #f8f9fa;
        padding: 12px;
        text-align: left;
        border-bottom: 2px solid #dee2e6;
    }

    .gv-style td {
        padding: 12px;
        border-bottom: 1px solid #eee;
    }

.btn {
	text-decoration:none;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
	text-decoration:none;
    background: #415a77;
    color: white;
}

.btn-danger {
	text-decoration:none;
    background: #e63946;
    color: white;
}
.btn-ok {
    text-decoration: none;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #cc0000;
    width:80px;
    color:white;
}

.search-card {
    background: #eaeff2;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #cfd8dc;
}

.search-grid {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.search-item {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
}

    .search-item label {
        font-size: 0.75em;
        font-weight: bold;
        color: #455a64;
        margin-bottom: 5px;
        text-transform: uppercase;
    }

.search-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* Remove right border of Confirm cell */
.gv-style td:nth-child(7) {
    border-right: none !important;
}

/* Remove right border of Thanks cell */
.gv-style td:nth-child(8) {
    border-right: none !important;
    border-left: none !important;
}

/* Remove left border of Edit/Delete cell */
.gv-style td:nth-child(9) {
    border-left: none !important;
}

/* LOGON PAGE */
.full-width {
    min-height: 100vh;
    width: 100%;
    /* Subtle gradient for a premium look */
    background: linear-gradient(135deg, #1b263b 0%, #415a77 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.form-container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    /* Deeper shadow for "floating" effect */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.form-header h1 {
    color: #1b263b; /* Match Sidebar */
    font-size: 1.8rem;
    margin-bottom: 30px;
    letter-spacing: 2px;
    font-weight: 800;
}

/* Added dot to fix selector */
.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px; /* More breathing room */
}

/* Modern Input Styling */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

    .form-control:focus {
        border-color: #415a77;
        outline: none;
        box-shadow: 0 0 0 3px rgba(65, 90, 119, 0.2);
    }

/* Buttons */
.btn-login {
    background: #1b263b;
    color: white !important;
    text-decoration: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
    display: block;
    border: none;
    cursor: pointer;
}

    .btn-login:hover {
        background: #415a77;
    }

/* Eye Icon placement fix */
.password-wrapper .form-control {
    padding-right: 45px;
}

.toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    z-index: 5;
}

/* Error Message Styling */
.alert-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #fde8e8;
    border-radius: 6px;
    border: 1px solid #f8b4b4;
    text-align: left;
    font-size: 0.9rem;
}

.login-footer-link {
    color: #415a77;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

    .login-footer-link:hover {
        text-decoration: underline;
    }

.logo-main {
    height: auto;
    width: 300px;
    margin-bottom: 10px;
}
/* ====================================== */

/* MASTERPAGE*/

/* USER PROFILE SECTION (Under Logo) */
.user-profile-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    font-size: 2rem;
    color: #415a77;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-label {
    font-size: 0.7rem;
    color: #778da9;
    text-transform: uppercase;
    font-weight: bold;
}

.user-name-text {
    font-size: 0.95rem;
    color: #e0e1dd;
    font-weight: 500;
}

/* NAVIGATION MENU ICONS */
.nav-menu li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* LOGOUT BUTTON STYLING */
.user-info {
    position: absolute;
    bottom: 0;
    padding: 15px;
    width: 100%;
    background: #0d1b2a;
    box-sizing: border-box;
}

.btn-logout {
    display: block;
    width: 200px;
    padding: 10px;
    text-align: center;
    background: transparent;
    border: 1px solid #e63946; /* Red border */
    color: #e63946 !important; /* Red text */
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .btn-logout:hover {
        background: #e63946; /* Red background on hover */
        color: white !important;
    }

    .btn-logout i {
        margin-right: 5px;
    }
    /*========================================================*/

/* REPORT PRINTING & LAYOUT */
:root {
    --primary-navy: #1b263b;
    --light-grey: #f8f9fa;
    --border-color: #dee2e6;
}

/* The Paper Area */
.report-wrapper {
    width: 210mm; /* A4 Width */
    margin: 10px auto;
    padding: 15mm;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
    font-family: "Times New Roman", Times, serif;
}

.report-header {
    text-align: center;
    border-bottom: 3px solid var(--primary-navy);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.report-header .logo { width: 220px; height: auto; margin-bottom: 5px; }

.report-title {
    font-family: "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 5px 0 5px 0;
}

/* Metadata Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    font-family: "Segoe UI", sans-serif;
    text-align: left;
}

.info-card { border-left: 4px solid var(--primary-navy); padding-left: 15px; }
.info-label { font-size: 11px; font-weight: bold; color: #777; text-transform: uppercase; display: block; }
.info-value { font-size: 14px; color: #1b263b; font-weight: 600; }

/* Table Styling */
.participant-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Segoe UI", sans-serif;
    margin-top: 10px;
}

.participant-table th {
    background-color: var(--primary-navy) !important;
    color: white !important;
    text-align: left;
    padding: 10px;
    font-size: 12px;
    text-transform: uppercase;
    -webkit-print-color-adjust: exact;
}

.participant-table td { padding: 6px 10px; border: 1px solid var(--border-color); font-size: 13px; }
.sig-line { height: 20px; margin: 3px 0; width: 100%; }

.report-footer {
    margin-top: 20px;
    font-size: 10px;
    text-align: center;
    color: #aaa;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

@media print {
    .no-print, .sidebar, .search-card { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .report-wrapper { margin: 0; padding: 0; box-shadow: none; width: 100%; padding: 10mm; border:none;}
    body { background: white; }
    @page { size: A4 portrait; margin: 1cm; }
	* {
        box-sizing: border-box;
    }
	.participant-table, .info-grid {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}