:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --danger: #ef4444;
    --header-bg: #ffffff;
    --menu-color: #1f2937;
}


body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

header {
    background: var(--header-bg);
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}


.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

nav a {
    text-decoration: none;
    color: var(--menu-color);
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}


nav a:hover {
    color: var(--primary-color);
}

.card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: #111827;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

tr:hover {
    background-color: #f9fafb;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    width: 95%;
    height: 95%;
    max-width: 1200px;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    flex-grow: 1;
    position: relative;
    background: #f3f4f6;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--danger);
}

/* Print Styles */
@media print {
    @page {
        size: A4;
        margin: 1cm;
    }

    header,
    .no-print,
    .modal-overlay {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .container,
    .card {
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
    }

    .btn {
        display: none;
    }

    a {
        text-decoration: none;
        color: black;
    }
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {

    .container,
    .nav-container {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-container nav {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.25rem;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    .lang-switch-btn {
        margin-inline-start: 0;
    }

    .card {
        padding: 1.25rem;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Stack grid layouts in forms */
    div[style*="display: grid; grid-template-columns: 1fr 1fr;"] {
        grid-template-columns: 1fr !important;
    }
}

@media screen and (max-width: 480px) {
    .container {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }

    .card {
        padding: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-link {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
        text-align: center;
    }

    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
        white-space: normal;
        /* Allow button text to wrap if really long */
    }

    .btn+.btn,
    .btn+.btn-secondary,
    .btn-secondary+.btn {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}