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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --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: 12px;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* Header & Navigation */
header {
    background: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

header h1 {
    color: var(--dark);
    font-size: 24px;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

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

.card-icon {
    font-size: 44px;
    margin-bottom: 20px;
    display: inline-block;
}

.card h2 {
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Forms - Modernized */
.form-container {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.form-container h2 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--light);
    padding-bottom: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s;
    background: var(--light);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

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

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Tables - Modernized */
.table-container {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 32px;
}

.table-container h2 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: var(--light);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px;
    border-bottom: 2px solid var(--border);
}

table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

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

table tr:hover {
    background: var(--light);
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-draft {
    background: #f1f5f9;
    color: #475569;
}

.badge-sent {
    background: #dbeafe;
    color: #1e40af;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Alerts */
.error-message {
    background: #fef2f2;
    color: #b91c1c;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    font-size: 14px;
}

.success-message {
    background: #ecfdf5;
    color: #065f46;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Utility classes */
.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.d-none {
    display: none !important;
}

/* Login Page Premium Styles */
.login-page {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.6s ease-out;
}

.login-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.login-header h1 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.login-form .input-group {
    margin-bottom: 24px;
}

.login-form label {
    font-weight: 600;
    margin-bottom: 10px;
}

.login-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-form .input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    opacity: 0.6;
}

.login-form input {
    padding-left: 48px;
    height: 54px;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    font-weight: 500;
}

.login-form input:focus {
    border-color: var(--primary);
    background: white;
}

.btn-login {
    width: 100%;
    height: 54px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.btn-arrow {
    font-size: 20px;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid #f1f5f9;
    padding-top: 24px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .login-content {
        padding: 32px 24px;
    }
}