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

:root {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --success: #10b981;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Landing Page / Public Pages */
.public-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    min-height: 100vh;
    padding: 2rem;
    background-image: radial-gradient(circle at 50% 0%, #e0f2fe 0%, transparent 70%);
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 4rem auto 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.header h1 span {
    color: var(--primary);
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--surface-color);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

/* Sidebar Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--surface-color);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2.5rem;
}

.sidebar-logo span {
    color: var(--primary);
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: #f0f9ff;
    color: var(--primary);
}

.main-content {
    flex-grow: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

.file-input {
    padding: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
}
.btn-secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
}

.btn.success {
    background: var(--success);
}
.btn.success:hover {
    background: #059669;
}

.btn-auto {
    width: auto !important;
    display: inline-block;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: none;
    box-shadow: none;
}

/* Lists */
.request-item {
    background: var(--surface-color);
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.request-item:hover {
    transform: translateY(-2px);
    border-color: #bae6fd;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending { background: #fef3c7; color: #d97706; }
.status-completed { background: #d1fae5; color: #059669; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(14, 165, 233, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

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

.bankid-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

.content-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
    }
    .sidebar-logo {
        margin-bottom: 1rem;
        text-align: center;
    }
    .nav-menu {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    .nav-item {
        margin-bottom: 0;
        white-space: nowrap;
    }
    .main-content {
        padding: 1.5rem 1rem;
    }
    .public-layout {
        padding: 1rem;
    }
}
