/* ================================
   GLOBAL STYLES & VARIABLES
   ================================ */

:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5f3dc4;
    --primary-light: #a29bfe;
    --secondary-color: #00b894;
    --secondary-dark: #00a880;
    --accent-color: #fdcb6e;
    --danger-color: #d63031;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --success-color: #27ae60;
    --light-bg: #f8f9fa;
    --dark-bg: #2d3436;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --border-color: #dfe6e9;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ================================
   CONTAINER
   ================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   NAVIGATION
   ================================ */

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

/* Admin Navigation */
.admin-navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-navbar .admin-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.admin-nav-actions {
    display: flex;
    gap: 1rem;
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* ================================
   BUTTONS
   ================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background-color: #229954;
}

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-copy {
    background-color: var(--info-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background-color: #2980b9;
}

.btn-status {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin: 0.5rem;
    border: 2px solid transparent;
}

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

.btn-pending:hover {
    background-color: #e67e22;
}

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

.btn-approved:hover {
    background-color: #229954;
}

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

.btn-rejected:hover {
    background-color: #c23030;
}

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

.btn-info:hover {
    background-color: #2980b9;
}

/* ================================
   FORMS
   ================================ */

.form-section {
    padding: 2rem 0;
}

.form-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.form-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

fieldset {
    border: none;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

fieldset:last-of-type {
    border-bottom: none;
}

legend {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 0;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
}

/* ================================
   SUCCESS MESSAGE
   ================================ */

.success-message {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}

.success-message.hidden {
    display: none;
}

.success-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tracking-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    word-break: break-all;
}

.success-note {
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* ================================
   TRACKING SECTION
   ================================ */

.tracking-section {
    padding: 2rem 0;
}

.tracking-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.tracking-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tracking-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
}

.tracking-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.result-details {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 6px;
}

.result-details.hidden {
    display: none;
}

.status-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.status-badge.pending {
    background-color: #ffeaa7;
    color: #d63031;
}

.status-badge.approved {
    background-color: #55efc4;
    color: #27ae60;
}

.status-badge.rejected {
    background-color: #fab1a0;
    color: #d63031;
}

.status-badge.info {
    background-color: #74b9ff;
    color: #0984e3;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item p {
    font-size: 1.1rem;
    color: var(--text-primary);
    word-break: break-word;
}

.reason-section,
.notes-section {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.reason-section label,
.notes-section label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.reason-section p,
.notes-section p {
    color: var(--text-primary);
    line-height: 1.8;
}

.timeline {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.timeline h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 120px;
}

.timeline-text {
    color: var(--text-primary);
}

.error-message {
    background-color: #fab1a0;
    color: #d63031;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.error-message.hidden {
    display: none;
}

/* ================================
   CONTACT SECTION
   ================================ */

.contact-section {
    padding: 2rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card ul,
.info-card ol {
    list-style-position: inside;
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.info-card a:hover {
    text-decoration: underline;
}

.info-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.contact-form-wrapper {
    display: flex;
    flex-direction: column;
}

.contact-form-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-form-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

/* ================================
   ABOUT SECTION
   ================================ */

.about-section {
    padding: 2rem 0;
}

.about-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.about-card h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-block {
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
}

.about-block h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-block ul,
.about-block ol {
    list-style-position: inside;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-block p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 6px;
}

.faq-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--text-secondary);
}

.cta-block {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: none;
}

.cta-block h3 {
    color: white;
    margin-bottom: 1rem;
}

.cta-block p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.btn-large {
    display: inline-block;
}

/* ================================
   ADMIN DASHBOARD
   ================================ */

.admin-body {
    background-color: #f0f2f5;
}

.admin-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.dashboard-header h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-control {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.control-buttons {
    display: flex;
    gap: 1rem;
}

.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.applications-table {
    width: 100%;
    border-collapse: collapse;
}

.applications-table thead {
    background-color: var(--primary-color);
    color: white;
}

.applications-table th {
    padding: 1.25rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.applications-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.applications-table td {
    padding: 1.25rem;
}

.no-data {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

/* ================================
   MODAL
   ================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 2rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.modal-field p {
    color: var(--text-primary);
    word-break: break-word;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.modal-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
}

.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* ================================
   UTILITIES
   ================================ */

.hidden {
    display: none !important;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .nav-brand h1 {
        font-size: 1.4rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .tracking-input {
        flex: 1;
    }

    .admin-navbar .admin-container {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-control {
        min-width: 100%;
    }

    .control-buttons {
        flex-direction: column;
    }

    .applications-table th,
    .applications-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-buttons {
        flex-direction: column;
    }

    .btn-status {
        width: 100%;
        margin: 0.5rem 0;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container,
    .admin-container {
        padding: 0 15px;
    }

    .form-card,
    .contact-form-card {
        padding: 1rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .applications-table {
        font-size: 0.85rem;
    }

    .applications-table th,
    .applications-table td {
        padding: 0.5rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }

    .tracking-display {
        flex-direction: column;
        gap: 0.5rem;
    }
}
