/* assets/css/style.css */

/* Global Variables & Colors */
:root {
    --primary: #0d5c3a;
    --primary-dark: #073822;
    --primary-light: #e6f4ea;
    --accent: #d4af37;
    --accent-light: #fdfaf0;
    --accent-hover: #c59f2e;
    --dark: #2c3e50;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font: 'Outfit', sans-serif;
}

/* Reset & Base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.app-navbar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
}

.navbar-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-title-details {
    display: flex;
    flex-direction: column;
}

.ysu-title-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    line-height: 1.2;
}

.ysu-sub-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.navbar-user-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info-text {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.badge-apptype {
    font-size: 0.75rem;
    background-color: var(--accent-light);
    color: #b58915;
    border: 1px solid var(--accent);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    align-self: flex-end;
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(13, 92, 58, 0.15);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 92, 58, 0.2);
}

.btn-secondary {
    background-color: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.btn-secondary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-logout-icon {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.btn-logout-icon:hover {
    background-color: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.icon {
    width: 20px;
    height: 20px;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-light);
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-danger {
    background-color: var(--danger-light);
    color: #991b1b;
    border-color: #fca5a5;
}

.alert-warning {
    background-color: var(--warning-light);
    color: #92400e;
    border-color: #fde68a;
}

/* Landing Page (index.php) Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 5rem 0 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--light-bg);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero-logo-box {
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-section h1 {
    color: var(--white);
    font-size: 2.75rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.guidelines-section {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
    margin-bottom: 4rem;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .guidelines-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.card-header {
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-accent {
    border-top: 4px solid var(--accent);
}

.guidelines-list {
    list-style: none;
}

.guidelines-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.guidelines-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--success);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Authentication Page Styles (Login/Register) */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    flex-grow: 1;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    border-top: 5px solid var(--primary);
}

.auth-logo-center {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-center svg {
    margin-bottom: 0.5rem;
}

.auth-card h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--light-bg);
    transition: all 0.2s ease;
    font-family: var(--font);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(13, 92, 58, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Dashboard Sidebar Layout */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 140px);
}

@media (max-width: 992px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
}

.dashboard-sidebar {
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar-menu-item a:hover {
    background-color: var(--light-bg);
    color: var(--primary);
}

.sidebar-menu-item.active a {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-menu-item.completed a .step-status-bullet {
    background-color: var(--success);
}

.sidebar-menu-item .step-status-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    margin-left: auto;
}

.dashboard-content {
    padding: 2.5rem;
    background-color: var(--light-bg);
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 1.5rem 1rem;
    }
}

/* Step Bar Progress Indicator */
.steps-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
    min-width: 80px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--border-color);
    z-index: 2;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.step-indicator.active .step-number {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 1px var(--primary);
}

.step-indicator.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-indicator.completed .step-number {
    background-color: var(--success);
    color: var(--white);
    box-shadow: 0 0 0 1px var(--success);
}

/* Table Style */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table th, .table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

/* Badge System */
.badge {
    display: inline-flex;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background-color: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background-color: var(--danger-light);
    color: #991b1b;
}

.badge-secondary {
    background-color: var(--light-bg);
    color: var(--text-secondary);
}

/* Passport Upload / Preview box */
.passport-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 1.5rem;
    background-color: var(--light-bg);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.passport-preview-box {
    width: 120px;
    height: 150px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.passport-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.passport-placeholder {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
    padding: 10px;
}

/* O'level Subject Matrix */
.subject-row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.btn-remove-row {
    color: var(--danger);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

/* Footer */
.app-footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-note {
    font-size: 0.8rem;
    margin-top: 4px;
    opacity: 0.7;
}

/* Printable Slip Layout */
@media print {
    body {
        background-color: var(--white);
        color: #000;
        font-size: 12pt;
    }
    
    .app-navbar, .dashboard-sidebar, .app-footer, .btn, .alert, .steps-progress-bar {
        display: none !important;
    }
    
    .dashboard-wrapper {
        display: block;
    }
    
    .dashboard-content {
        padding: 0;
        background-color: var(--white);
    }
    
    .print-slip-container {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}
