/* VET Approval Tool - Stylesheet */

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --success: #0f9d58;
    --warning: #f4b400;
    --danger: #db4437;
    --partial: #ff6d00;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #dadce0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h1 {
    font-size: 1.3rem;
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--primary);
    color: white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* User Bar */
.user-bar {
    background: #e8f0fe;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.role-badge {
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.8rem;
    color: var(--text);
}

.subtitle {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--border);
}

.stat-card.stat-pending { border-top-color: var(--warning); }
.stat-card.stat-approved { border-top-color: var(--success); }
.stat-card.stat-partial { border-top-color: var(--partial); }
.stat-card.stat-denied { border-top-color: var(--danger); }
.stat-card.stat-total { border-top-color: var(--primary); }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th, .data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.headcount {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Form Card */
.form-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.required {
    color: var(--danger);
}

.form-info {
    background: #e8f0fe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-approve { background: var(--success); color: white; }
.btn-approve:hover { background: #0b8043; }

.btn-deny { background: var(--danger); color: white; }
.btn-deny:hover { background: #c53929; }

.btn-filter { background: var(--primary); color: white; padding: 0.5rem 1.2rem; }

.btn-download { 
    background: var(--success); 
    color: white; 
    padding: 0.5rem 1.2rem;
    margin-left: auto;
}

.btn-secondary { 
    background: transparent; 
    color: var(--primary); 
    border: 2px solid var(--primary);
    margin-top: 1rem;
}

.btn-small {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
}

/* Director Request Cards */
.director-requests {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.request-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--warning);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.request-id {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.request-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 160px;
}

.headcount-highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.action-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.action-form {
    padding: 1rem;
    border-radius: 8px;
}

.approve-form {
    background: #e6f4ea;
}

.deny-form {
    background: #fce8e6;
}

.action-form h4 {
    margin-bottom: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending, .status-badge.status-pending { background: #fef7e0; color: #b8860b; }
.status-approved, .status-badge.status-approved { background: #e6f4ea; color: #0f9d58; }
.status-badge.status-partially-approved { background: #fff3e0; color: #e65100; }
.status-denied, .status-badge.status-denied { background: #fce8e6; color: #db4437; }

/* Search Bar */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-search {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
}

.btn-clear {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 0;
}

/* Filters */
.filters {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-action {
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.action-submitted { background: #e8f0fe; color: var(--primary); }
.action-approved { background: #e6f4ea; color: var(--success); }
.action-partially-approved { background: #fff3e0; color: var(--partial); }
.action-denied { background: #fce8e6; color: var(--danger); }

.timeline-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success { background: #e6f4ea; color: #0f9d58; border: 1px solid #0f9d58; }
.alert-error { background: #fce8e6; color: #db4437; border: 1px solid #db4437; }
.alert-warning { background: #fef7e0; color: #b8860b; border: 1px solid #f4b400; }

.alert-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: inherit;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Section */
.section {
    margin-bottom: 2rem;
}

.section h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 3rem;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    margin-bottom: 1.5rem;
}

.btn-full {
    width: 100%;
}

.btn-logout {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--danger);
    border-radius: 6px;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    .action-forms {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
