/* Hyper Admin Dashboard Styles */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --success-color: #00b894;
    --danger-color: #e17055;
    --warning-color: #fdcb6e;
    --info-color: #74b9ff;
    --dark-color: #2d3436;
    --light-color: #ddd6fe;
    --sidebar-bg: #313a46;
    --sidebar-dark: #2a3441;
    --topbar-bg: #ffffff;
    --body-bg: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #6c757d;
    --text-dark: #495057;
    --border-color: #e3ebf6;
    --shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
    --shadow-lg: 0 1rem 3rem rgba(18, 38, 63, 0.175);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

/* Login Styles */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.login-logo i {
    font-size: 32px;
    color: var(--primary-color);
}

.login-logo h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
}

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

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

.input-group-text {
    background-color: var(--body-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

.btn-login {
    width: 100%;
    padding: 12px;
    font-weight: 500;
    border-radius: 6px;
    background: var(--primary-color);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Main App Layout */
.main-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.sidebar-brand i {
    font-size: 24px;
    color: var(--primary-color);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active .nav-link {
    background: var(--primary-color);
    color: white;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: all 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

/* Topbar */
.topbar {
    background: var(--topbar-bg);
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover {
    background: var(--body-bg);
    color: var(--text-dark);
}

.page-title {
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    font-size: 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-dropdown .btn {
    background: none;
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-dropdown .btn:hover {
    background: var(--body-bg);
    color: var(--text-dark);
}

/* Page Content */
.page-content {
    padding: 25px;
}

.content-page {
    display: none;
}

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

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.card-title {
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    font-size: 16px;
}

.card-body {
    padding: 25px;
}

/* Stats Cards */
.stats-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stats-card-body {
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-info h3 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 28px;
    margin: 0 0 5px 0;
}

.stats-label {
    color: var(--text-color);
    font-size: 14px;
    margin: 0 0 8px 0;
}

.stats-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
}

.stats-change.positive {
    color: var(--success-color);
}

.stats-change.negative {
    color: var(--danger-color);
}

.stats-change.neutral {
    color: var(--text-color);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 24px;
}

/* Tables */
.table {
    color: var(--text-color);
    margin-bottom: 0;
}

.table thead th {
    background: var(--body-bg);
    color: var(--text-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding: 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(108, 92, 231, 0.05);
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    z-index: 2;
}

.search-box .form-control {
    padding-left: 45px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #00a085;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #d63031;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #e84393;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Recent Conversations */
.recent-conversations {
    max-height: 400px;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.conversation-info {
    flex: 1;
}

.conversation-name {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    font-size: 14px;
}

.conversation-message {
    color: var(--text-color);
    font-size: 12px;
    margin: 0;
}

.conversation-time {
    color: var(--text-color);
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 15px 20px;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .stats-card-body {
        padding: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .topbar-right {
        gap: 10px;
    }
    
    .page-content {
        padding: 15px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Modal Improvements */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 25px;
}

/* Chat Messages in Modal */
.chat-message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    max-width: 80%;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.bot {
    background: var(--body-bg);
    color: var(--text-dark);
}

.chat-timestamp {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}
