/* ==========================================
   LKA Kursų registracija — Stiliai
   Pagrindinė spalva: #651725 (maroon)
   ========================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: url("data:image/svg+xml,%3Csvg%20width%3D%221440%22%20height%3D%22811%22%20viewBox%3D%220%200%201440%20811%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M-77.5835%20-82.0397C-70.3508%20-127.305%20-27.7927%20-158.137%2017.4727%20-150.904L171.778%20-126.249C217.043%20-119.016%20247.875%20-76.458%20240.642%20-31.1926L215.322%20127.276C208.089%20172.542%20165.531%20203.374%20120.266%20196.141L-34.0397%20171.486C-79.3051%20164.253%20-110.137%20121.695%20-102.904%2076.4293L-77.5835%20-82.0397Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.15%22%2F%3E%0A%3Cpath%20d%3D%22M127.233%20703.216C109.431%20660.974%20129.244%20612.299%20171.485%20594.497L395.161%20500.233C437.403%20482.431%20486.078%20502.244%20503.88%20544.485L598.144%20768.161C615.946%20810.403%20596.133%20859.078%20553.892%20876.88L330.216%20971.144C287.974%20988.946%20239.299%20969.133%20221.497%20926.891L127.233%20703.216Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.15%22%2F%3E%0A%3Cpath%20d%3D%22M1071.36%20-7.03973C1078.6%20-52.3052%201121.15%20-83.1368%201166.42%20-75.9041L1579.86%20-9.84302C1625.13%20-2.61037%201655.96%2039.9477%201648.73%2085.2132L1581.46%20506.21C1574.23%20551.475%201531.67%20582.307%201486.4%20575.074L1072.96%20509.013C1027.7%20501.781%20996.863%20459.223%201004.1%20413.957L1071.36%20-7.03973Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.15%22%2F%3E%0A%3C%2Fsvg%3E%0A") no-repeat fixed 50%, linear-gradient(225deg, rgb(31, 0, 15), rgb(101, 23, 37));
    min-height: 100vh;
    color: #333;
}

/* ========== Header ========== */

.header {
    background: #651725;
    padding: 18px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.header-logo {
    height: 44px;
    width: auto;
}

/* ========== Main ========== */

.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ========== Turinio kortelė ========== */

.content-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 3px solid #651725;
}

.content-title {
    font-size: 20px;
    font-weight: 700;
    color: #651725;
}

/* ========== Filtras ========== */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar label {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.filter-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    min-width: 200px;
    cursor: pointer;
    outline: none;
    color: #333;
}

.filter-bar select:focus {
    border-color: #651725;
    box-shadow: 0 0 0 2px rgba(101, 23, 37, 0.15);
}

/* ========== Kursų lentelė ========== */

.courses-container {
    overflow-x: auto;
}

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

.courses-table thead th {
    background: #651725;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
}

.courses-table tbody tr.course-row {
    cursor: pointer;
    transition: background 0.15s;
}

.courses-table tbody tr.course-row:hover {
    background: #faf5f6;
}

.courses-table tbody td {
    color: #444;
    font-size: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.courses-table tbody tr.course-row:last-child td {
    border-bottom: none;
}

.category-cell {
    font-weight: 600;
    color: #651725;
    background: #fdf8f9;
    border-right: 2px solid #f0e4e6;
    font-size: 13px;
}

.name-cell {
    font-weight: 600;
    color: #651725;
}

.desc-cell {
    color: #888;
    font-size: 13px;
    max-width: 280px;
    line-height: 1.4;
}

.group-cell,
.date-cell {
    white-space: nowrap;
    color: #666;
    font-size: 13px;
}

/* ========== Loading / klaidos ========== */

.loading {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 60px 20px;
}

.error-message {
    text-align: center;
    color: #e74c3c;
    font-size: 14px;
    padding: 60px 20px;
}

.no-courses {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 60px 20px;
}

/* ========== Modalas ========== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 460px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #651725;
    margin-bottom: 4px;
}

.modal-course-name {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}

/* ========== Forma ========== */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
}

.required {
    color: #e74c3c;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus {
    border-color: #651725;
    box-shadow: 0 0 0 2px rgba(101, 23, 37, 0.1);
}

.form-group input.input-error {
    border-color: #e74c3c;
}

.recaptcha-group {
    display: flex;
    justify-content: center;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #651725;
    color: #fff;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    background: #4a1019;
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ========== Pranešimas ========== */

.form-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== Footer ========== */

.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* ========== Responsive ========== */

@media (max-width: 768px) {
    .main-wrapper {
        padding: 16px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .filter-bar {
        width: 100%;
    }

    .filter-bar select {
        flex: 1;
    }

    .courses-table thead {
        display: none;
    }

    .courses-table,
    .courses-table tbody,
    .courses-table tr,
    .courses-table td {
        display: block;
    }

    .courses-table tbody tr.course-row {
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .courses-table tbody td {
        padding: 3px 0;
        border-bottom: none;
    }

    .courses-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: #aaa;
        display: block;
        margin-bottom: 1px;
    }

    .category-cell {
        background: none;
        border-right: none;
        padding-bottom: 6px;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }

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