/* ─────────────────────────────────────────────────────────────────────
   TAKUMI HUB — Workshops Admin Module CSS
   ───────────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────────────────── */

.workshops-tabs {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.tab-btn.active {
    color: var(--ink);
    border-bottom-color: var(--copper);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ─────────────────────────────────────────────────────────────────────
   TOOLBAR & FILTERS
   ───────────────────────────────────────────────────────────────────── */

.workshops-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.select-filter {
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
    outline: none;
}

.select-filter:hover {
    border-color: var(--copper);
}

/* ─────────────────────────────────────────────────────────────────────
   WORKSHOP CARDS GRID
   ───────────────────────────────────────────────────────────────────── */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.workshop-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.workshop-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--copper);
}

.card-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-type {
    background: #E4EDE8;
    color: #1A3D2B;
}

.badge-draft {
    background: #f5f5f5;
    color: #666;
}

.badge-open {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-full {
    background: #FFF3E0;
    color: #E65100;
}

.badge-closed {
    background: #FFEBEE;
    color: #C62828;
}

.badge-completed {
    background: #E3F2FD;
    color: #1565C0;
}

.workshop-card h3 {
    margin: 12px 0 16px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.card-info {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 9px 14px;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--copper);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--ink);
    border: 1px solid var(--border);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

/* ─────────────────────────────────────────────────────────────────────
   DRAWER
   ───────────────────────────────────────────────────────────────────── */

.drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.drawer.active {
    right: 0;
}

.drawer-content {
    padding: 24px;
    position: relative;
}

.drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
}

.drawer h2 {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────
   FORMS
   ───────────────────────────────────────────────────────────────────── */

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-input,
.form-input:focus {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.form-input:focus {
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(160, 82, 45, 0.1);
}

textarea.form-input {
    resize: vertical;
    font-family: 'DM Sans', sans-serif;
}

/* ─────────────────────────────────────────────────────────────────────
   PRICING TABLE
   ───────────────────────────────────────────────────────────────────── */

.pricing-table {
    background: #f9f9f9;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.pricing-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row > div:first-child {
    font-size: 13px;
    font-weight: 500;
}

.pricing-row input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.pricing-row input:focus {
    border-color: var(--copper);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.form-actions .btn {
    flex: 1;
    padding: 12px;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────
   REGISTRATIONS VIEW
   ───────────────────────────────────────────────────────────────────── */

.registrations-header {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.registrations-header h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.registrations-header p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.header-stats {
    display: flex;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
}

.registrations-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.search-input:focus {
    border-color: var(--copper);
}

/* ─────────────────────────────────────────────────────────────────────
   REGISTRATIONS TABLE
   ───────────────────────────────────────────────────────────────────── */

.registrations-table-container {
    overflow-x: auto;
}

.registrations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.registrations-table thead {
    background: #f9f9f9;
    border-bottom: 2px solid var(--border);
}

.registrations-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--ink);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.registrations-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
}

.registrations-table tbody tr:hover {
    background: #fafafa;
}

.registrations-table small {
    font-size: 12px;
    color: var(--muted);
}

.registrations-table a {
    color: var(--copper);
    text-decoration: none;
}

.registrations-table a:hover {
    text-decoration: underline;
}

.badge-category {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-pending {
    background: #fff3e0;
    color: #e65100;
}

.badge-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-failed {
    background: #ffebee;
    color: #c62828;
}

.badge-refunded {
    background: #f5f5f5;
    color: #666;
}

/* ─────────────────────────────────────────────────────────────────────
   MODAL & DETAIL VIEW
   ───────────────────────────────────────────────────────────────────── */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 32, 24, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
}

.modal-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-section h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.modal-section p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-entry {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
}

.log-entry small {
    color: var(--muted);
    font-weight: 500;
}

.log-entry strong {
    color: var(--ink);
}

.log-entry em {
    color: #666;
    font-style: italic;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ─────────────────────────────────────────────────────────────────────
   LOADING & EMPTY STATES
   ───────────────────────────────────────────────────────────────────── */

.loading {
    padding: 40px;
    text-align: center;
    color: var(--muted);
}

.error {
    padding: 16px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 5px;
    color: #c62828;
    font-size: 13px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--copper);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.link-btn:hover {
    opacity: 0.8;
}

/* ─────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .drawer {
        width: 100%;
        right: -100%;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .registrations-header {
        flex-direction: column;
    }

    .header-stats {
        margin-top: 16px;
        width: 100%;
        justify-content: space-between;
    }

    .modal-content {
        width: 90%;
        max-width: none;
    }

    .registrations-toolbar {
        flex-direction: column;
    }

    .registrations-toolbar .btn {
        width: 100%;
    }
}
