:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 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);
}

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

body {
    background-color: var(--background);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.sidebar-nav {
    flex: 1;
    padding: 20px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-nav li i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-nav li:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.sidebar-nav li.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.sidebar-footer {
    padding: 30px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px 40px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.search-box {
    background-color: white;
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 350px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 25px;
}

.notification {
    position: relative;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.notification .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--background);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-info img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: var(--shadow);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.users { background-color: #eef2ff; color: #6366f1; }
.stat-icon.actions { background-color: #f0fdf4; color: #22c55e; }
.stat-icon.voice { background-color: #fff7ed; color: #f97316; }
.stat-icon.text { background-color: #f5f3ff; color: #8b5cf6; }

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info h2 {
    font-size: 24px;
    font-weight: 700;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.chart-box, .recent-users-box, .table-container, .settings-form {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.chart-box h3, .recent-users-box h3 {
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 700;
}

/* List Items */
.recent-user-item {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.recent-user-item:last-child {
    border-bottom: none;
}

.user-meta h4 {
    font-size: 14px;
    font-weight: 600;
}

.user-meta p {
    font-size: 12px;
    color: var(--text-muted);
}

.platform-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.platform-badge.android { background-color: #dcfce7; color: #15803d; }
.platform-badge.ios { background-color: #fef9c3; color: #a16207; }

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms & Inputs - IMPROVED */
.settings-form {
    max-width: 800px;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 15px;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-group.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

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

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

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

/* History Items */
.history-item {
    background-color: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.type-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: var(--primary);
}

.history-content {
    flex: 1;
}

.history-content p {
    font-weight: 500;
    margin-bottom: 4px;
}

.history-content span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.history-time {
    font-size: 13px;
    color: var(--text-muted);
}

/* Login Page - PREMIUM */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.login-card {
    background-color: white;
    padding: 50px;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 20px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.login-card h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.login-card p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 40px;
}

.login-card .form-group {
    text-align: left;
}
