:root {
    --primary: #FF6B6B;
    --primary-hover: #EE5253;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --background: #F7F9FC;
    --surface: #FFFFFF;
    --text-main: #2D3436;
    --text-muted: #636E72;
    --border: #DFE6E9;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #F1F3F5;
    border-color: #CED4DA;
}

/* Header Styles */
.header {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.header-buttons {
    display: flex;
    gap: 12px;
}

/* User Profile Dropdown */
.user-profile {
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #00CBA9;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
    z-index: 1000;
    border: 1px solid #f0f0f0;
    padding: 8px 0;
}

/* Hidden bridge to prevent dropdown from closing when cursor moves over the gap */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.user-profile:hover .dropdown-menu {
    display: block;
}

.dropdown-header {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item svg {
    color: #64748b;
}

.credit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #0d9488;
    font-weight: 500;
    margin-bottom: 4px;
}

/* --- Standardized Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.modal-content p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.cancel {
    background: #f1f5f9;
    color: #475569;
}

.modal-btn.cancel:hover {
    background: #e2e8f0;
}

.modal-btn.confirm {
    background: #2ecc71;
    color: white;
}

.modal-btn.confirm:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

/* --- Dashboard Layout --- */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: #f8fafc;
}

.main-content {
    flex: 1;
    padding: 40px;
    background-color: #f8fafc;
    min-width: 0;
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .main-content {
        padding: 20px;
    }
}