/* ==========================================
   Studio Dashboard Styles
   ========================================== */

/* Global Layout */
.studio-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    font-family: 'Tajawal', sans-serif;
    color: #374151;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

/* Icons/Buttons Generic */
.btn-icon {
    margin-right: 4px;
    /* RTL fix logic generally needs margin-left, but usually we use gap */
}

[dir="rtl"] .btn-icon {
    margin-right: 0;
    margin-left: 4px;
}

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

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-icon {
    font-size: 32px;
    background: #F3F4F6;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-content {
    flex: 1;
    margin-right: 16px;
    /* RTL logic */
}

[dir="rtl"] .stat-content {
    margin-right: 16px;
    margin-left: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: #6B7280;
    margin-top: 4px;
}

.stat-trend {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-trend.positive {
    background: #D1FAE5;
    color: #059669;
}

/* Tabs */
.tabs-container {
    margin-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.tabs-nav {
    display: flex;
    gap: 24px;
}

.tab-btn {
    padding: 12px 4px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: #D4A853;
    border-bottom-color: #D4A853;
}

.tab-panel {
    display: none;
}

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

/* Calendar Layout */
.calendar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
}

.dashboard-calendar {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cal-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.cal-nav-btn:hover {
    background: #F3F4F6;
}

.cal-month {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    padding: 8px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover:not(.booked):not(.empty) {
    background: #F3F4F6;
}

.calendar-day.available {
    /* specific dashboard styling if needed */
}

.calendar-day.booked {
    background: #FEE2E2;
    color: #DC2626;
    position: relative;
}

/* Optional: indicator dot for bookings in dashboard view */
.calendar-day.booked::after {
    /* content: ''; */
    /* position: absolute; bottom: 4px; width: 4px; height: 4px; background: currentColor; border-radius: 50%; */
}

.calendar-day.empty {
    cursor: default;
}

.upcoming-bookings {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 24px;
}

/* Booking Cards (Upcoming) */
.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.booking-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #F3F4F6;
}

.booking-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    min-width: 60px;
}

.date-day {
    font-weight: 700;
    font-size: 14px;
    color: #374151;
}

.date-month {
    font-size: 11px;
    color: #6B7280;
}

.booking-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.booking-client {
    font-weight: 600;
    color: #111827;
}

.booking-details {
    font-size: 12px;
    color: #6B7280;
}

.booking-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}

.booking-status.paid {
    background: #D1FAE5;
    color: #059669;
}

.booking-status.pending {
    background: #FEF3C7;
    color: #D97706;
}

.booking-actions {
    display: flex;
    gap: 4px;
}

/* Filters Row */
.filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    margin-bottom: 24px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0 12px;
}

.search-icon {
    color: #9CA3AF;
    margin-left: 8px;
}

.search-input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    outline: none;
}

.filter-select,
.filter-date {
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

/* Table */
.table-container {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
}

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

.data-table th {
    background: #F9FAFB;
    text-align: right;
    /* RTL */
    padding: 12px 24px;
    font-weight: 600;
    color: #4B5563;
    font-size: 13px;
    border-bottom: 1px solid #E5E7EB;
}

[dir="rtl"] .data-table th {
    text-align: right;
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #F3F4F6;
    color: #374151;
    font-size: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
}

.status-paid {
    background: #D1FAE5;
    color: #059669;
}

.status-pending {
    background: #FEF3C7;
    color: #D97706;
}

.category-badge {
    padding: 4px 8px;
    border-radius: 6px;
    background: #F3F4F6;
    font-size: 12px;
}

.cat-maintenance {
    background: #E0E7FF;
    color: #4338CA;
}

.cat-equipment {
    background: #ECFDF5;
    color: #047857;
}

.cat-utilities {
    background: #FFFBEB;
    color: #B45309;
}

/* Pagination */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #E5E7EB;
}

.pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.page-btn.active {
    background: #D4A853;
    color: white;
    border-color: #D4A853;
}

.page-btn:disabled {
    background: #F9FAFB;
    color: #D1D5DB;
    cursor: not-allowed;
}

/* Modals Generic */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-md {
    max-width: 600px;
}

.modal-sm {
    max-width: 400px;
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: inherit;
}

.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-suffix {
    position: absolute;
    left: 12px;
    color: #6B7280;
    font-size: 13px;
}

[dir="rtl"] .input-suffix {
    left: 12px;
    right: auto;
}

/* Summary Cards Inline */
.summary-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.summary-card-inline {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.summary-icon {
    font-size: 28px;
    background: #EFF6FF;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.summary-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.summary-label {
    font-size: 13px;
    color: #6B7280;
}

/* Provided Settings CSS */

/* Cancel Modal */
.confirm-message {
    text-align: center;
    font-size: 16px;
    color: #374151;
    margin-bottom: 20px;
}

.cancel-info {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.cancel-info div {
    padding: 4px 0;
    font-size: 14px;
    color: #374151;
}

/* Button Danger */
.btn-danger {
    background: #DC2626;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #B91C1C;
}

/* Settings Container */
.settings-container {
    max-width: 800px;
}

.settings-section {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    font-size: 24px;
}

.feature-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
}

/* Gallery Upload */
.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.gallery-thumb {
    position: relative;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

/* Working Days */
.working-days {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.day-checkbox:has(input:checked) {
    background: #D1FAE5;
    border-color: #059669;
}

/* Settings Footer */
.settings-footer {
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: #F9FAFB;
}

.file-upload-area:hover {
    border-color: #D4A853;
    background: #FFFBEB;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.upload-text {
    color: #6B7280;
    font-size: 14px;
}