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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-bg: #f3f4f6;
    --sidebar-width: 260px;
    --header-height: 70px;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --card-radius: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    padding: 20px 15px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.sidebar-link.active {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Card Styling */
.card {
    background: white;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 24px;
}

/* Button Styling */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Table Styling */
.table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

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

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px 10px;
    }

    /* Mobile Table to Card Transformation */
    .mobile-hidden {
        display: none !important;
    }

    .mobile-card-view {
        display: block;
    }

    .desktop-table-view {
        display: none !important;
    }

    .client-card {
        background: white;
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        border: none;
        position: relative;
        overflow: hidden;
    }

    .client-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--primary-color);
    }

    .client-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .client-card-title {
        font-weight: 700;
        font-size: 1.25rem;
        color: var(--dark-color);
    }

    .client-card-id {
        font-size: 0.8rem;
        color: #94a3b8;
        background: #f1f5f9;
        padding: 4px 8px;
        border-radius: 6px;
    }

    .client-card-info {
        margin-bottom: 20px;
    }

    .client-card-row {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        font-size: 0.95rem;
        color: #475569;
    }

    .client-card-row i {
        width: 24px;
        color: var(--primary-color);
        margin-right: 8px;
    }

    .client-card-actions {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        border-top: 1px solid #f1f5f9;
        padding-top: 15px;
    }

    .btn-icon {
        width: 100%;
        height: 40px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .mobile-card-view {
        display: none;
    }

    .desktop-table-view {
        display: block;
    }
}