/* Modern UI Refinements */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #10b981;
    /* Emerald 500 */
    --primary-hover: #059669;
    /* Emerald 600 */
    --bg-page: #f8fafc;
    /* Slate 50 */
    --surface: #ffffff;
    --border-color: #e2e8f0;
    /* Slate 200 */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* --- Scrollbars --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* --- Form Elements --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    border: 1px solid var(--border-color) !important;
    border-radius: 0.5rem !important;
    /* 8px */
    padding: 0.625rem 1rem !important;
    font-size: 0.95rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
    outline: none !important;
}

label {
    font-weight: 500 !important;
    margin-bottom: 0.375rem !important;
    color: #334155 !important;
    /* Slate 700 */
    font-size: 0.9rem !important;
}

/* --- Cards --- */
.card,
.bg-white {
    border: 1px solid #f1f5f9 !important;
    /* Slate 100 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    border-radius: 1rem !important;
    /* 16px */
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    background-color: #f8fafc !important;
    /* Slate 50 */
    color: #475569 !important;
    /* Slate 600 */
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover {
    background-color: #f8fafc !important;
}

tbody td {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    font-size: 0.95rem !important;
}

/* Last row border fix */
tbody tr:last-child td {
    border-bottom: none !important;
}

/* --- Utilities --- */
.shadow-soft {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}