:root {
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899; /* Pink */
    --bg-color: #f3f4f6; /* Light gray background */
    --surface-color: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --sidebar-width: 260px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--secondary-color);
}

.sidebar-nav {
    padding: 20px 16px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-group {
    margin-top: 24px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 16px;
}

.nav-group-title i {
    margin-right: 8px;
}

.sub-item {
    padding-left: 52px;
    font-size: 14px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Topbar */
.topbar {
    height: 70px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.topbar-search {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    padding: 8px 16px;
    border-radius: 20px;
    width: 300px;
}

.topbar-search i {
    color: var(--text-secondary);
    margin-right: 8px;
}

.topbar-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: inherit;
    color: var(--text-primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

/* Content Wrapper */
.content-wrapper {
    padding: 32px;
    flex: 1;
}

/* Cards and Dashboard Elements */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.welcome-card h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    z-index: 1;
}

.welcome-card p {
    font-size: 18px;
    opacity: 0.9;
    z-index: 1;
    max-width: 600px;
}

.big-logo {
    font-size: 80px;
    margin-bottom: 24px;
    z-index: 1;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.welcome-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

/* CRUD Tables & Forms */
.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: rgba(243, 244, 246, 0.5);
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background-color: #dcfce7;
    color: #166534;
}

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

.action-btns {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.btn-edit { background-color: var(--primary-color); }
.btn-delete { background-color: #ef4444; }

.btn-icon:hover {
    transform: scale(1.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    background-color: #f9fafb;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background-color: white;
}

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