/* Requests Board Styles - Site Theme Compatible */

:root {
    --primary-bg: #111;
    --secondary-bg: #1c1c1e;
    --tertiary-bg: #282828;
    --accent-color: #E8BD2C;
    --accent-hover: #d1a826;
    --text-primary: #fff;
    --text-secondary: #aaa;
    --text-muted: #888;
    --border-color: rgba(255, 255, 255, 0.1);
}

.board-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header Section */
.board-header {
    margin-bottom: 2.5rem;
}

.header-content {
    text-align: center;
    margin-bottom: 2rem;
}

.header-content h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #E8BD2C;
    text-align: center;
}

.header-content h1 i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.header-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: var(--tertiary-bg);
    border-color: var(--accent-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-pending .stat-number {
    color: #ffc107;
}

.stat-progress .stat-number {
    color: #17a2b8;
}

.stat-done .stat-number {
    color: #28a745;
}

/* Filters Section */
.filters-section {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

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

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.filter-group select,
.filter-group input[type="text"] {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 180px;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--tertiary-bg);
}

.search-group {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-group input {
    width: 100%;
    padding-right: 3rem;
}

.search-group button {
    position: absolute;
    right: 0;
    bottom: 0;
    background: var(--accent-color);
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0.6rem 1.2rem;
    color: #000;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-group button:hover {
    background: var(--accent-hover);
}

.btn-reset-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    color: #dc3545;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    align-self: flex-end;
}

.btn-reset-filters:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.5);
}

/* Requests Table */
.requests-table-wrapper {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

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

.requests-table thead {
    background: var(--primary-bg);
    border-bottom: 2px solid var(--accent-color);
}

.requests-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requests-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.requests-table tbody tr:hover {
    background: var(--tertiary-bg);
}

.requests-table td {
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Title Cell */
.title-cell {
    max-width: 400px;
}

.title-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.title-content .year {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.details-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Type Badge */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(108, 117, 125, 0.2);
    border: 1px solid rgba(108, 117, 125, 0.3);
    border-radius: 4px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 4px;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

.status-in-progress {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.4);
    color: #17a2b8;
}

.status-done {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #28a745;
}

.status-rejected {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #dc3545;
}

/* Link Cell */
.link-cell {
    white-space: nowrap;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.link-btn:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.no-link {
    color: var(--text-muted);
}

/* Date Cell */
.date-cell {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.date-cell i {
    margin-right: 0.4rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 1rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cta-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: #000;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 189, 44, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .requests-table th:nth-child(4),
    .requests-table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .board-container {
        padding: 1.5rem 1rem;
    }

    .header-content h1 {
        font-size: 2rem;
    }

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

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
        min-width: auto;
    }

    .search-group {
        min-width: auto;
    }

    .btn-reset-filters {
        align-self: stretch;
        justify-content: center;
    }

    /* Mobile Table - Two Row Layout */
    .requests-table thead {
        display: none;
    }

    .requests-table tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.5rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .requests-table tbody tr:hover {
        background: var(--tertiary-bg);
    }

    .requests-table td {
        padding: 0;
        display: flex;
        align-items: center;
    }

    /* Перший рядок: Title | Status */
    .title-cell {
        grid-column: 1;
        grid-row: 1;
        max-width: 100%;
    }

    .requests-table td:nth-child(3) { /* Status */
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    /* Другий рядок: Type + Date */
    .requests-table td:nth-child(2) { /* Type */
        grid-column: 1;
        grid-row: 2;
    }

    .date-cell {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        font-size: 0.8rem;
    }

    /* Link cell -ховаємо на мобільних */
    .link-cell {
        display: none;
    }

    .title-cell {
        max-width: 100%;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }

    .date-cell i {
        display: none;
    }
}
