:root {
    /* Brand Colors */
    --primary: #2563ea;
    /* Bright Blue */
    --primary-hover: #1d4ed8;
    --secondary: #eff6ff;
    --background: #f3f4f6;
    --surface: #ffffff;

    /* Text */
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    /* Status */
    --success: #10b981;
    --error: #ef4444;

    /* Borders & Shadows */
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.navbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.brand-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link {
    color: var(--primary);
    text-decoration: none;
}

.nav-link.secondary {
    color: var(--text-muted);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    /* Placeholder */
    background-image: url('https://i.pravatar.cc/150?img=5');
    /* Example avatar */
    background-size: cover;
}

/* Main Layout */
.main-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-header {
    margin-bottom: 2rem;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
}

/* Grid Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.card-icon {
    color: var(--primary);
    background: var(--secondary);
    padding: 0.5rem;
    /* fixed padding */
    width: 2rem;
    /* fixed dimensions */
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

input,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    background-color: #f9fafb;
    /* Slightly gray input bg */
    transition: all 0.2s;
}

input:focus,
select:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Specific Date Picker styling imitation */
.date-picker-container {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.date-display {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    font-weight: 500;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-top: 1rem;
}

.calendar-day-header {
    color: var(--text-muted);
    font-weight: 600;
}

.calendar-day {
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-main);
}

.calendar-day.active {
    background-color: var(--primary);
    color: white;
}

.calendar-day.muted {
    color: var(--text-light);
}

/* Client Section Placeholder */
.empty-state {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 1rem;
    padding: 3rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
}

.empty-icon {
    background: #e0e7ff;
    color: var(--primary);
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    max-width: 250px;
    line-height: 1.5;
}

/* Tip Box */
.tip-box {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.tip-title {
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tip-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-search {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0 1.5rem;
    font-weight: 600;
    cursor: pointer;
}

/* Footer Action */
.action-footer {
    margin-top: 3rem;
    text-align: center;
    padding-bottom: 3rem;
}

.action-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
}

.btn-large {
    font-size: 1.125rem;
    padding: 1rem 3rem;
    width: auto;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-large:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.w-full {
    width: 100%;
}

/* Alerts from old CSS (kept for compatibility) */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Ticket Preview */
.ticket-preview {
    margin-top: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}

/* RFC Feedback */
.rfc-feedback-message {
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rfc-feedback-info {
    background-color: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.rfc-feedback-error {
    background-color: #fef2f2;
    color: var(--error);
    border: 1px solid #fee2e2;
}