@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --danger: #ef4444;
    --success: #10b981;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 16px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.muted {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Dashboard Hero - Legacy removed, see Modern Redesign below */
/* .card.highlight.dashboard-hero block removed */

.grid {
    display: grid;
    gap: 1.5rem;
}

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

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
button {
    cursor: pointer;
    padding: 0.625rem 1.25rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25), 0 2px 4px -1px rgba(37, 99, 235, 0.15);
    filter: brightness(110%);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

button.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    filter: none;
}

button.outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    box-shadow: none;
    border-radius: 12px;
}

button.outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: none;
    filter: none;
}

button.outline.done {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

/* Forms */
.inline-edit-input {
    padding: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 36px; /* Consistent height */
}

.inline-edit-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input, select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.375rem;
}

/* Lists */
.list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.notification:hover {
    transform: translateX(4px);
    border-color: #cbd5e1;
}

.badge {
    padding: 0.375rem 0.875rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

/* Dashboard Hero Modern Redesign */
.dashboard-hero {
    background: linear-gradient(135deg, #0f172a, #334155);
    color: white;
    border: none;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.3), transparent 60%);
    pointer-events: none;
}

.dashboard-hero h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.dashboard-hero .muted {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Summary Cards (Glassmorphism) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}

.summary-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
    display: flex;
    flex-direction: column;
}

.summary-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.summary-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-menu {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.summary-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin: 0.5rem 0;
    letter-spacing: -0.03em;
}

.summary-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.pill-group {
    margin-top: auto;
}

.pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pill:hover {
    background: white;
    color: #0f172a;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Quick Actions Redesign */
.quick-actions-grid {
    display: grid;
    gap: 1.5rem;
}

.action-card {
    background: #ffffff;
    border: none;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.action-header {
    margin-bottom: 1.25rem;
}

.action-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.action-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.action-button {
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4), 0 4px 6px -2px rgba(59, 130, 246, 0.2);
}

.action-button:hover::before {
    opacity: 1;
}

.action-button:active {
    transform: translateY(0);
}

.action-button.secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.action-button.secondary::before {
    display: none;
}

.action-button.secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.action-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.action-input:focus {
    outline: none;
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Modern Task List */
.notification {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #cbd5e1;
    border-radius: 4px 0 0 4px;
}

.notification:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

.notification strong {
    color: #334155;
    font-weight: 600;
}

.notification .muted {
    font-size: 0.8rem;
    color: #94a3b8;
}

.notification button.outline {
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    background: white;
    transition: all 0.2s;
}

.notification button.outline:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Rates Grid Redesign */
.rates-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.rate-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.rate-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.rate-card.highlight .rate-card-icon {
    background: #eff6ff;
    color: var(--primary);
}

.rate-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.rate-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.rate-input-group input {
    font-weight: 700;
    text-align: right;
    padding: 0.6rem;
    margin: 0;
    font-size: 1rem;
}

.rate-input-group span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    letter-spacing: -0.025em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
}

.sidebar-nav a {
    text-decoration: none;
    color: #94a3b8;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar-nav a.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.sidebar-nav a.logout {
    margin-top: auto;
    color: #f87171;
}

.sidebar-nav a.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.main-content {
    flex: 1;
    padding: 2.5rem;
    background: #f8fafc;
    overflow-y: auto;
    margin-left: 280px;
    height: 100vh;
}

/* Login Layout */
.login-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f1f5f9;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Redesigned Assignment Card */
.assignment-card {
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.assignment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.assignment-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.assignment-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.type-permanent { background: #eff6ff; color: #1d4ed8; }
.type-temporary { background: #fffbeb; color: #b45309; }
.type-monthly { background: #f0fdf4; color: #15803d; }

.assignment-rates {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.rate-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rate-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.rate-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.assignment-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.assignment-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

/* Redesigned Earnings Overview */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.today { background: #eff6ff; color: #2563eb; }
.stat-icon.month { background: #f0fdf4; color: #16a34a; }
.stat-icon.total { background: #fffbeb; color: #d97706; }

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.performance-card {
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.perf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.perf-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.125rem;
}

.perf-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.perf-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Invoice Styles */
.invoice-box {
    max-width: 800px;
    margin: auto;
    padding: 3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    font-size: 16px;
    line-height: 24px;
    font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
    color: #555;
    background: #fff;
    border-radius: var(--radius);
}

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

.invoice-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.invoice-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    letter-spacing: -0.025em;
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

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

.invoice-table th {
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
}

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

.invoice-table .total-row td {
    border-top: 2px solid var(--primary);
    border-bottom: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    padding-top: 1.5rem;
}

.invoice-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Compact Assignment List (Minimal) */
.compact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compact-assignment-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.compact-assignment-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.compact-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.compact-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compact-rates {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    font-weight: 500;
}

.compact-actions {
    display: flex;
    gap: 0.75rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
    box-shadow: none;
    padding: 0;
}

.icon-btn:hover {
    background: #eff6ff;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.icon-btn.done {
    background: #ecfdf5;
    border-color: #10b981;
    color: #047857;
}

@media (max-width: 600px) {
    .compact-assignment-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .compact-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .icon-btn {
        flex: 1;
    }
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

/* New FB Assignment Design */
.compact-assignment-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 1.25rem;
    padding: 1.25rem 1.25rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(2,6,23,0.03);
}

.compact-assignment-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 12px 28px rgba(2,6,23,0.06);
    transform: none;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.compact-info {
    gap: 0.5rem;
}

.compact-header {
    justify-content: space-between;
}

.compact-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin: 0.25rem 0;
}

.rate-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    font-weight: 500;
}

.rate-pill i {
    color: #94a3b8;
    font-size: 0.85rem;
}

.stat-icon.pending {
    background: #fff7ed;
    color: #f59e0b;
}

.stat-icon.pending i {
    color: #d97706;
}

.fb-progress {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.fb-progress-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.fb-progress-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 999px;
}

.fb-progress-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.compact-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 0.5rem;
}

.fb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    cursor: pointer;
    min-width: 85px;
}

.fb-btn .fa-solid {
    font-size: 1rem;
    color: #94a3b8;
    transition: color 0.2s;
}

/* Hover Effects */
.fb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Photo - Blue */
.fb-btn[data-fb-task="post"]:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}
.fb-btn[data-fb-task="post"]:hover .fa-solid { color: #2563eb; }

/* Reel - Pink/Rose */
.fb-btn[data-fb-task="reel"]:hover {
    border-color: #ec4899;
    background: #fdf2f8;
    color: #be185d;
}
.fb-btn[data-fb-task="reel"]:hover .fa-solid { color: #db2777; }

/* Story - Amber */
.fb-btn[data-fb-task="story"]:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
}
.fb-btn[data-fb-task="story"]:hover .fa-solid { color: #d97706; }

/* Done State */
.fb-btn.done {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.fb-btn.done .fa-solid {
    color: #16a34a;
}
.fb-btn.done:hover {
    background: #dcfce7;
    border-color: #16a34a;
    transform: none;
    box-shadow: none;
}

.data-table th {
    padding: 1rem;
    background: #f8fafc;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.95rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8fafc;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Login Switch */
.login-switch {
    display: flex;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.switch-btn {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.625rem;
    border-radius: 6px;
    box-shadow: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.switch-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
    transform: none;
}

.switch-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive List (Compact) */
.responsive-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
}

.list-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

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

.list-row:hover {
    background: #f8fafc;
}

.list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #1877f2;
    width: 24px;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
    min-width: 0;
}

.inline-edit-input {
    border: 1px solid transparent;
    background: transparent;
    padding: 0.25rem 0.5rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-main);
    width: 100%;
    border-radius: 4px;
}

.inline-edit-input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.inline-edit-input:hover {
    background: rgba(0,0,0,0.02);
}

.list-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.list-status {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
}

.list-actions {
    display: flex;
    gap: 0.25rem;
}

.list-actions .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    border-radius: 6px;
}

@media (max-width: 600px) {
    .list-row {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .list-status {
        display: none; /* Hide status on mobile to save space if needed, or keep it */
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #10b981;
    color: white;
}

.toast.error {
    background: #ef4444;
    color: white;
}

/* Custom Select Dropdown */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.inline-edit-input {
    background-position: right 0.5rem center;
    padding-right: 2rem; 
}

.missed-history {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.missed-day {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.missed-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.missed-day-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.missed-day-list {
    display: flex;
    flex-direction: column;
}

.missed-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

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

.missed-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.missed-user {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.missed-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.missed-badge {
    align-self: start;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.missed-pages {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.4rem 0.8rem;
}

.missed-pages li {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.6rem;
    border-radius: 10px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.nav-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}

@media (max-width: 600px) {
    .missed-item {
        grid-template-columns: 1fr;
    }
    .missed-badge {
        justify-self: start;
    }
}
