/* Dashboard CSS - Modern Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

.login-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
}

.login-footer h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #495057;
}

.test-accounts {
    display: grid;
    gap: 10px;
}

.account-item {
    font-size: 12px;
    color: #6c757d;
    padding: 8px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
    border-left-color: #667eea;
}

.nav-item.active {
    background: #f0f2ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 500;
}

.nav-item.logout {
    color: #dc3545;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.nav-item.logout:hover {
    background: #fff5f5;
    color: #dc3545;
}

.icon {
    font-size: 18px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.content-header h1 {
    font-size: 32px;
    color: #2c3e50;
    font-weight: 600;
}

.last-login {
    color: #6c757d;
    font-size: 14px;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    gap: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.card-content {
    padding: 25px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-number.pending {
    color: #ffc107;
}

.stat-number.approved {
    color: #28a745;
}

.stat-number.rejected {
    color: #dc3545;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Submissions List */
.submissions-list {
    display: grid;
    gap: 20px;
}

.submission-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.submission-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.submission-info p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.submission-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
}

.submission-meta span {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.submission-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.status-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.review-notes {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    resize: vertical;
    min-height: 60px;
}

/* Submission Form */
.submission-form {
    display: grid;
    gap: 20px;
}

.submission-form .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state p {
    font-size: 16px;
}

/* Unauthorized Page */
.unauthorized-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unauthorized-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.unauthorized-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

.unauthorized-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.unauthorized-card h1 {
    font-size: 32px;
    color: #dc3545;
    margin-bottom: 15px;
}

.unauthorized-card p {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 16px;
}

.unauthorized-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .submission-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .submission-actions {
        align-items: flex-start;
    }
    
    .unauthorized-actions {
        flex-direction: column;
    }
}

/* Application Forms Styles */
.application-form {
    display: grid;
    gap: 25px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.form-section h4 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.guidelines {
    line-height: 1.6;
}

.guidelines h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.guidelines ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.guidelines li {
    margin-bottom: 5px;
    color: #6c757d;
}

.user-division {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}

/* Applications List */
.applications-list {
    display: grid;
    gap: 20px;
}

.application-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.application-header h4 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.application-id {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.application-details {
    display: grid;
    gap: 8px;
}

.detail-row {
    display: flex;
    gap: 10px;
}

.detail-label {
    font-weight: 500;
    color: #6c757d;
    min-width: 100px;
}

.detail-value {
    color: #2c3e50;
}

.form-data {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-data h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.data-grid {
    display: grid;
    gap: 10px;
}

.data-item {
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.data-item:last-child {
    border-bottom: none;
}

.data-item strong {
    color: #495057;
    margin-right: 10px;
}

.file-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.file-link:hover {
    text-decoration: underline;
}

.application-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    min-width: 200px;
}

.application-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.review-notes {
    background: #fff3cd;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #ffc107;
    font-size: 14px;
    max-width: 300px;
}

.review-notes-input {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    resize: vertical;
    min-height: 60px;
}

/* Form Options */
.form-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-option {
    display: block;
    padding: 25px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.form-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.form-icon {
    font-size: 40px;
    margin-bottom: 15px;
    text-align: center;
}

.form-option h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.form-option p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* File Upload Styles */
.file-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    margin-top: 5px;
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .submission-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .review-notes {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .application-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .application-actions {
        align-items: flex-start;
        min-width: auto;
    }
    
    .form-options {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-label {
        min-width: auto;
    }
}
