/* TORCH ATL Operations Suite - Styles */

:root {
    --primary: #D4AF37;
    --primary-dark: #B8962E;
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-input: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border: #2a2a2a;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --residency: #D4AF37;
    --member: #60a5fa;
    --session: #a78bfa;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */

.login-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.login-screen.active {
    display: flex;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.login-brand h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 8px;
    margin-bottom: 4px;
}

.login-brand span {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 6px;
}

.login-tagline {
    color: var(--text-muted);
    margin-bottom: 40px;
}

#admin-login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

#admin-login-form label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#admin-login-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
}

#admin-login-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 24px;
    line-height: 1.6;
}

.btn.full {
    width: 100%;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* User Info in Sidebar */
.user-info {
    margin-bottom: 12px;
}

.user-info span {
    display: block;
}

#current-user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-btn {
    width: 100%;
    margin-bottom: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

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

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 4px;
}

.logo span {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-links li {
    padding: 14px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-links li:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-primary);
}

.nav-links li.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-links .icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-footer .countdown {
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    font-size: 11px;
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    flex-shrink: 0;
}

.connection-status.connected .status-dot {
    background: #22c55e;
    box-shadow: 0 0 4px #22c55e88;
}

.connection-status.disconnected .status-dot {
    background: #ef4444;
    box-shadow: 0 0 4px #ef444488;
}

.connection-status .status-text {
    color: var(--text-muted);
}

.connection-status .last-refreshed {
    color: var(--text-muted);
    opacity: 0.7;
    margin-left: auto;
    font-size: 10px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 32px;
    min-height: 100vh;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

.page-header h2 {
    font-size: 28px;
    font-weight: 600;
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn.primary:hover {
    background: var(--primary-dark);
}

.btn.secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn.secondary:hover {
    background: var(--border);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.card.full-width {
    grid-column: span 2;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Session List */
.session-list, .activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-item, .activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
}

.session-item .member-name {
    font-weight: 500;
}

.session-item .session-time {
    color: var(--text-secondary);
    font-size: 13px;
}

.activity-item {
    font-size: 14px;
}

.activity-item .time {
    color: var(--text-muted);
    font-size: 12px;
}

/* Tier Bars */
.tier-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tier-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tier-label {
    width: 160px;
    font-size: 14px;
}

.bar-container {
    flex: 1;
    height: 24px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
}

.bar.residency { background: var(--residency); }
.bar.member { background: var(--member); }
.bar.session { background: var(--session); }

.tier-count {
    width: 50px;
    text-align: right;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filters input,
.filters select {
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.filters input {
    flex: 1;
    max-width: 300px;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
}

tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tier-badge.residency {
    background: rgba(212, 175, 55, 0.2);
    color: var(--residency);
}

.tier-badge.member {
    background: rgba(96, 165, 250, 0.2);
    color: var(--member);
}

.tier-badge.session {
    background: rgba(167, 139, 250, 0.2);
    color: var(--session);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-badge.paused {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.action-btn {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* Calendar */
.booking-views {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.view-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.calendar-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

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

.calendar-header button {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
}

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

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    background: var(--bg-input);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: var(--border);
}

.calendar-day.today {
    border: 2px solid var(--primary);
}

.calendar-day.has-booking::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.calendar-day.other-month {
    color: var(--text-muted);
}

/* SMS Grid */
.sms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.sms-grid .full-width {
    grid-column: span 2;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-input);
    border-radius: 26px;
    transition: 0.3s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .slider {
    background: var(--primary);
}

.toggle input:checked + .slider::before {
    transform: translateX(22px);
    background: #000;
}

/* Automation List */
.automation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.automation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.automation-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.automation-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Template Cards */
.template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.template-card {
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.template-card:hover {
    border-color: var(--primary);
}

.template-card h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.template-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.history-item .message {
    flex: 1;
    font-size: 14px;
}

.history-item .meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Email Grid */
.email-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.email-grid .full-width {
    grid-column: span 2;
}

.email-composer {
    grid-column: span 1;
}

/* Email Editor */
.editor-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.editor-toolbar button {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
}

.editor-toolbar button:hover {
    background: var(--border);
}

.editor-toolbar .separator {
    color: var(--border);
    padding: 0 8px;
}

.email-editor {
    min-height: 200px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.email-editor:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Email Templates */
.email-template-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-template {
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.email-template:hover {
    background: var(--border);
}

.email-template h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.email-template p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Email Tabs */
.email-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.email-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.email-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.email-item .subject {
    flex: 1;
    font-weight: 500;
}

.email-item .recipients {
    color: var(--text-secondary);
    font-size: 13px;
}

.email-item .date {
    color: var(--text-muted);
    font-size: 12px;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tier-settings, .camp-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tier-setting, .camp-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.tier-info h4 {
    font-size: 14px;
    font-weight: 500;
}

.tier-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.tier-price, .price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.integration-list, .agent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.integration-item, .agent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.integration-status, .agent-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
}

.integration-status.connected, .agent-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.integration-status.pending, .agent-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.wide {
    max-width: 800px;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content form {
    padding: 24px;
}

/* Toast */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Email Preview */
.email-preview {
    padding: 24px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.email-preview .preview-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Square Setup */
.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.field-help {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
}

.status-message.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-message.info {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.product-name {
    font-weight: 500;
    font-size: 14px;
}

.product-price {
    font-size: 13px;
    color: var(--primary);
}

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

.settings-grid .full-width {
    grid-column: span 2;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar .logo span,
    .nav-links span:not(.icon),
    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 60px;
    }

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

    .dashboard-grid,
    .sms-grid,
    .email-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .card.full-width,
    .sms-grid .full-width,
    .email-grid .full-width,
    .settings-grid .full-width {
        grid-column: span 1;
    }
}

/* ============================================
   ENGINEER MANAGEMENT
   ============================================ */

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge.lead {
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary);
}

.role-badge.standard {
    background: rgba(96, 165, 250, 0.2);
    color: var(--member);
}

.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ============================================
   PENDING REQUESTS (Engineer View)
   ============================================ */

.pending-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.request-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.request-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.request-type {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 20px;
    color: var(--text-secondary);
}

.request-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.request-details .detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.request-actions {
    display: flex;
    gap: 12px;
}

.request-actions .btn {
    flex: 1;
}

/* ============================================
   SESSION REPORTS
   ============================================ */

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.report-card.submitted {
    border-left: 4px solid var(--warning);
}

.report-card.reviewed {
    border-left: 4px solid var(--success);
}

.report-card.draft {
    border-left: 4px solid var(--text-muted);
}

.report-card.pending {
    border-left: 4px solid var(--danger);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.report-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.report-date {
    font-size: 13px;
    color: var(--text-muted);
}

.report-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.report-notes {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.reports-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.report-tab {
    padding: 10px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

/* Session Report Modal */
.report-session-info {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.report-session-info .info-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.report-session-info .info-row:last-child {
    margin-bottom: 0;
}

.report-session-info .info-label {
    color: var(--text-muted);
    min-width: 80px;
}

/* Rating Input */
.rating-input {
    display: flex;
    gap: 4px;
}

.rating-input .star {
    font-size: 28px;
    color: var(--border);
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input .star:hover,
.rating-input .star.active {
    color: var(--primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Report Detail View */
.report-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.detail-section {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 16px;
}

.detail-section.full-width {
    grid-column: span 2;
}

.detail-section.issues {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.detail-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.detail-section .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

.detail-section .detail-row span:first-child {
    color: var(--text-muted);
}

.detail-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Report View Content Scrollable */
.report-view-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 24px;
}

/* Engineer Calendar Container */
.engineer-calendar-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .engineer-calendar-container {
        grid-template-columns: 1fr;
    }
}

/* Session Item in Engineer View */
.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 8px;
}

.session-item:last-child {
    margin-bottom: 0;
}

.session-item .member-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.session-item .session-time {
    font-size: 12px;
    color: var(--text-muted);
}

.session-hours {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* Status Badges */
.status-badge.active,
.status-badge.accepted {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.pending,
.status-badge.assigned,
.status-badge.requested {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-badge.inactive,
.status-badge.declined {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-badge.submitted {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-badge.reviewed {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.draft {
    background: rgba(136, 136, 136, 0.2);
    color: var(--text-secondary);
}

/* ============================================
   ENGINEER CRM
   ============================================ */

.engineer-crm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.engineer-crm-toolbar .filters {
    margin-bottom: 0;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

/* Engineer Cards Grid */
.engineer-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.engineer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.engineer-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.engineer-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.engineer-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.engineer-card-info {
    flex: 1;
}

.engineer-card-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.engineer-card-info .engineer-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.engineer-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.engineer-stat {
    text-align: center;
}

.engineer-stat .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.engineer-stat .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.engineer-card-specialties {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.specialty-tag {
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    border-radius: 20px;
}

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

.engineer-card-actions .btn {
    flex: 1;
}

/* Engineer Profile Modal */
.engineer-profile-content {
    padding: 24px;
}

.engineer-profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.engineer-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #000;
}

.engineer-profile-info {
    flex: 1;
}

.engineer-profile-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.engineer-profile-info .profile-contact {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.engineer-profile-stats {
    display: flex;
    gap: 24px;
}

.profile-stat {
    text-align: center;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
}

.profile-stat .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.profile-tab {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.profile-tab-content {
    display: none;
}

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

/* Overview Grid */
.profile-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.overview-section {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 20px;
}

.overview-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.overview-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.specialty-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.metric:last-child {
    border-bottom: none;
}

.metric-label {
    color: var(--text-muted);
}

.metric-value {
    font-weight: 600;
    color: var(--primary);
}

.recent-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 6px;
}

.recent-session-item .session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-session-item .session-member {
    font-weight: 500;
    font-size: 14px;
}

.recent-session-item .session-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Sessions List in Profile */
.profile-sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.profile-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 8px;
}

.profile-session-item:last-child {
    margin-bottom: 0;
}

.session-main-info {
    flex: 1;
}

.session-main-info .member-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.session-main-info .session-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.session-hours-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 20px;
}

.sessions-filter-bar {
    margin-bottom: 16px;
}

.sessions-filter-bar select {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

/* Earnings Section */
.earnings-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.earnings-card {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.earnings-card h4 {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

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

.earnings-breakdown h4 {
    font-size: 14px;
    margin-bottom: 16px;
}

.earnings-table {
    width: 100%;
}

.earnings-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 6px;
    margin-bottom: 8px;
}

.earnings-row .month {
    font-weight: 500;
}

.earnings-row .amount {
    color: var(--primary);
    font-weight: 600;
}

/* Availability Grid */
.availability-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.availability-day {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 16px 8px;
    text-align: center;
}

.availability-day.available {
    border: 1px solid var(--success);
}

.availability-day.unavailable {
    opacity: 0.5;
}

.day-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.day-hours {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Notes Section */
.notes-section h4 {
    font-size: 14px;
    margin-bottom: 16px;
}

.notes-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.note-item {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.note-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.add-note-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-note-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.add-note-form .btn {
    align-self: flex-end;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

/* Star Rating Display */
.star-rating {
    color: var(--primary);
    letter-spacing: 2px;
}

.star-rating .empty {
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .engineer-cards-grid {
        grid-template-columns: 1fr;
    }

    .engineer-profile-header {
        flex-direction: column;
    }

    .engineer-profile-stats {
        flex-wrap: wrap;
    }

    .earnings-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .availability-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   NEW BOOKING MODAL — Room, Dates, Time Blocks
   ============================================ */

/* Room Selection */
.room-selection {
    display: flex;
    gap: 12px;
}

.room-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.room-option:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.room-option.selected {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
    color: var(--primary);
}

.room-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.2s;
}

.room-option.selected .room-icon {
    background: var(--primary);
    color: #000;
}

/* Session Date Rows */
#session-dates-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.session-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlideIn 0.25s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.session-date-row .session-date-input {
    flex: 0 0 160px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.session-date-row .session-date-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Time Block Toggle */
.time-block-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    flex: 1;
}

.time-block {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.time-block small {
    font-size: 11px;
    color: var(--text-muted);
}

.time-block:first-child {
    border-right: 1px solid var(--border);
}

.time-block:hover {
    background: var(--border);
}

.time-block.active {
    background: var(--primary);
    color: #000;
}

.time-block.active small {
    color: rgba(0, 0, 0, 0.6);
}

/* Add/Remove Date Buttons */
.btn-add-date {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-date:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-remove-date {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-date:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: var(--danger);
}

/* Estate Access Section */
.estate-access-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    margin-bottom: 8px;
}

.estate-access-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.estate-access-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Booking modal form padding override for new layout */
#add-booking-modal .modal-content form {
    padding: 20px 24px;
}

/* ============================================
   OPERATIONS TAB
   ============================================ */

/* Sub-tabs */
.operations-sub-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ops-sub-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.ops-sub-tab:hover {
    color: var(--text-primary);
}

.ops-sub-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Views container */
.ops-view {
    display: none;
}

.ops-view.active {
    display: block;
}

/* Operations Calendar */
.ops-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.ops-calendar-header h3 {
    min-width: 200px;
    text-align: center;
}

.ops-calendar-header button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.ops-calendar-header button:hover {
    background: var(--bg-input);
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Event dots */
.event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.event-dot.booking { background: #60a5fa; }
.event-dot.cleaning { background: #22c55e; }
.event-dot.maintenance { background: #f59e0b; }
.event-dot.repair { background: #ef4444; }
.event-dot.estate { background: #a78bfa; }

/* Calendar grid (reuse pattern) */
.ops-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.ops-calendar-grid .calendar-day-header {
    background: var(--bg-card);
    padding: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.ops-calendar-day {
    background: var(--bg-dark);
    min-height: 80px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.ops-calendar-day:hover {
    background: var(--bg-card);
}

.ops-calendar-day.today {
    background: rgba(212, 175, 55, 0.08);
}

.ops-calendar-day.selected {
    background: rgba(212, 175, 55, 0.15);
    outline: 1px solid var(--primary);
}

.ops-calendar-day.other-month {
    opacity: 0.3;
}

.ops-calendar-day .day-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ops-calendar-day .day-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

/* Day detail panel */
.day-detail-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

.day-detail-panel h4 {
    margin-bottom: 12px;
    color: var(--primary);
}

.day-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.day-detail-item:last-child {
    border-bottom: none;
}

.day-detail-item .event-dot {
    flex-shrink: 0;
}

.day-detail-item .detail-time {
    color: var(--text-secondary);
    min-width: 50px;
}

.day-detail-item .detail-info {
    flex: 1;
}

/* Filter bar */
.ops-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.ops-filter-bar select {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

/* Cards grid */
.ops-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* Booking card */
.booking-card, .task-card, .estate-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.2s;
}

.booking-card:hover, .task-card:hover, .estate-card:hover {
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.card-meta span {
    margin-right: 12px;
}

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

.card-actions .btn {
    font-size: 12px;
    padding: 6px 14px;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-badge.confirmed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.declined {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge.in_progress, .status-badge.in-progress {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.cancelled {
    background: rgba(85, 85, 85, 0.15);
    color: #888;
}

.status-badge.reviewing {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
}

.status-badge.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Task type badges */
.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.type-badge.cleaning {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.type-badge.maintenance {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.type-badge.repair {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.type-badge.inspection {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

/* Room badge */
.room-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary);
}

/* Estate detail modal content */
.estate-detail-content .info-row {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.estate-detail-content .info-label {
    color: var(--text-secondary);
    min-width: 120px;
    font-weight: 500;
}

/* Empty state */
.ops-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.ops-empty h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .operations-sub-tabs {
        -webkit-overflow-scrolling: touch;
    }

    .ops-cards-grid {
        grid-template-columns: 1fr;
    }

    .ops-filter-bar {
        flex-direction: column;
    }

    .ops-calendar-day {
        min-height: 50px;
        padding: 4px;
    }

    .ops-calendar-day .day-number {
        font-size: 10px;
    }
}
