:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #64748b;
    --text: #1e293b;
    --text-muted: #64748b;
    --pending: #94a3b8;
    --accepted: #3b82f6;
    --started: #f59e0b;
    --completed: #10b981;
    --cancelled: #ef4444;
    --border: #e2e8f0;
    --glass-border: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

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

header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h1 span {
    color: var(--text);
}

header p {
    color: var(--secondary);
}

h2 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.full-width {
    grid-column: span 12;
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

input, select {
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    color: var(--text);
    font-size: 0.875rem;
    transition: all 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary.loading .loader {
    display: inline-block;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

th {
    padding: 0.75rem 1rem;
    color: var(--secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

tr:hover td {
    background-color: #f8fafc;
}

.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.pending { background: #f1f5f9; color: #475569; }
.accepted { background: #eff6ff; color: #1d4ed8; }
.started { background: #fffbeb; color: #b45309; }
.completed { background: #f0fdf4; color: #15803d; }
.cancelled { background: #fef2f2; color: #b91c1c; }

.action-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.text-center { text-align: center; }
.spacer { height: 2rem; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: none;
    width: 100%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem !important;
}

.stat-icon {
    font-size: 2rem;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.75rem;
    border-radius: 1rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    color: var(--secondary);
    font-size: 0.875rem;
}

.action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

/* Notification Toast */
#notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: #fff;
    border: 1px solid var(--border);
    border-left-width: 4px;
    color: var(--text);
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.toast.success { border-left-color: var(--completed); }
.toast.info { border-left-color: var(--accepted); }
.toast.error { border-left-color: var(--cancelled); }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #f1f5f9;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
    z-index: 1;
}

.timeline-content {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timeline-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--secondary);
}

.timeline-message {
    font-size: 0.875rem;
    color: var(--text);
    margin: 0;
}

.timeline-status.pending { color: var(--pending); }
.timeline-status.accepted { color: var(--accepted); }
.timeline-status.started { color: var(--started); }
.timeline-status.completed { color: var(--completed); }
.timeline-status.cancelled { color: var(--cancelled); }

@media (max-width: 640px) {
    body { padding: 1rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .card { padding: 1.5rem; }
    .modal-content { margin: 1rem; }
}
