/* --- portal.webnitycare.au/assets/css/style.css --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #3b82f6;
    --sidebar-text: #cbd5e1;
    --sidebar-active-text: #ffffff;
    --topbar-bg: #ffffff;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-main);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* --- Sidebar --- */
.sidebar {
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: white;
    position: fixed;
    width: 250px;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

body.sidebar-collapsed .sidebar {
    width: 80px;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand img {
    height: 32px;
    /* Placeholder for logo if any */
    width: auto;
}

.sidebar-brand span {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.2s ease, width 0.2s ease;
    white-space: nowrap;
}

body.sidebar-collapsed .sidebar-brand span {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar-nav {
    padding: 24px 16px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav-item {
    margin-bottom: 8px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 12px;
}

.sidebar-nav-link i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.sidebar-nav-link:hover {
    background-color: var(--sidebar-hover);
    color: white;
}

.sidebar-nav-link:hover i {
    transform: translateX(3px);
}

.sidebar-nav-link.active {
    background-color: var(--sidebar-active);
    color: var(--sidebar-active-text);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

body.sidebar-collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .sidebar-nav-link span {
    display: none;
}

body.sidebar-collapsed .sidebar-nav-link i {
    font-size: 1.3rem;
    margin: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: var(--sidebar-text);
    margin: 0;
}

body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .user-info {
    display: none;
}

body.sidebar-collapsed .sidebar-user a {
    display: none;
}

/* --- Topbar --- */
.topbar {
    background-color: var(--topbar-bg);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: fixed;
    width: calc(100% - 250px);
    left: 250px;
    top: 0;
    z-index: 990;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.sidebar-collapsed .topbar {
    width: calc(100% - 80px);
    left: 80px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-action {
    color: var(--text-muted);
    font-size: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.topbar-action:hover {
    color: var(--primary-color);
}

.badge-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger-color);
    border: 2px solid white;
}

/* --- Content Wrapper --- */
.content-wrapper {
    margin-left: 250px;
    padding: 100px 32px 32px;
    /* 70px topbar + 30px spacing */
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.sidebar-collapsed .content-wrapper {
    margin-left: 80px;
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-main) !important;
}

.card-header i {
    color: var(--text-muted);
}

/* --- Stats Cards (Premium) --- */
.stat-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-primary-soft {
    background: #eff6ff;
    color: var(--primary-color);
}

.bg-success-soft {
    background: #f0fdf4;
    color: var(--success-color);
}

.bg-warning-soft {
    background: #fffbeb;
    color: var(--warning-color);
}

.stat-card h5 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

/* --- Buttons --- */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

/* --- Tables --- */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 16px;
}

.table td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9;
}

/* --- Badges --- */
.badge {
    padding: 6px 10px;
    font-weight: 500;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge-soft-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-soft-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* --- Login Page specific --- */
.login-body {
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand i {
    font-size: 3rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.login-brand h4 {
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.form-control {
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    transition: all 0.2s;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* --- Forms --- */
.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 6px;
}

/* --- Utilities --- */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .topbar {
        width: 100%;
        left: 0;
    }

    .content-wrapper {
        margin-left: 0;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(0);
        width: 250px;
    }

    body.sidebar-collapsed .sidebar-brand span,
    body.sidebar-collapsed .sidebar-nav-link span,
    body.sidebar-collapsed .user-info,
    body.sidebar-collapsed .sidebar-user a {
        display: block;
        opacity: 1;
        width: auto;
    }

    body.sidebar-collapsed .sidebar-nav-link {
        justify-content: flex-start;
        padding: 12px 16px;
    }

    body.sidebar-collapsed .sidebar-nav-link i {
        font-size: 1.1rem;
        margin-right: 12px;
    }

    /* Mobile dark overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    body.sidebar-collapsed .sidebar-overlay {
        display: block;
    }
}