/*
Theme Name: Bengal Agent
Theme URI: https://yourdomain.com/
Author: Your Name
Author URI: https://yourdomain.com/
Description: Premium Agent Management System for WordPress
Version: 1.0.0
License: GPL v2 or later
Text Domain: bengal-agent
*/

/* ===== Variables ===== */
:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --secondary: #00C9A7;
    --danger: #FF6B6B;
    --warning: #FECA57;
    --info: #48DBFB;
    --dark: #2D3436;
    --light: #F8F9FA;
    --gray: #636E72;
    --white: #FFFFFF;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F0F2F5;
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -50px;
    right: -50px;
    animation: float 20s infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: float 25s infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

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

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

.login-logo img {
    max-height: 80px;
    width: auto;
}

.login-logo h1 {
    font-size: 24px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray);
}

.login-form .input-group {
    position: relative;
}

.login-form .input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E8ECF1;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
}

.login-form .input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
}

.login-form .input-group .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray);
    background: none;
    border: none;
    font-size: 18px;
}

.login-form .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.login-form .form-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.login-form .form-options a {
    font-size: 14px;
    color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,99,255,0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.login-error {
    display: none;
    background: #FEE;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid var(--danger);
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #F0F2F5;
}

.sidebar-brand img {
    height: 40px;
    width: auto;
}

.sidebar-brand h3 {
    font-size: 18px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.sidebar-menu .menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray);
    transition: var(--transition);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar-menu .menu-item:hover {
    background: #F8F9FA;
    color: var(--primary);
}

.sidebar-menu .menu-item.active {
    background: rgba(108,99,255,0.08);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu .menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-menu .menu-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 20px;
}

/* Top Header */
.top-header {
    background: var(--white);
    padding: 15px 30px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.top-header .left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-header .toggle-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

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

.top-header .wallet-balance {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.top-header .notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gray);
}

.top-header .notification-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-header .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.top-header .user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.top-header .user-profile .username {
    font-weight: 500;
    font-size: 14px;
}

/* ===== Dashboard Cards ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.dashboard-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.dashboard-card .card-icon.primary { background: rgba(108,99,255,0.1); color: var(--primary); }
.dashboard-card .card-icon.success { background: rgba(0,201,167,0.1); color: var(--secondary); }
.dashboard-card .card-icon.danger { background: rgba(255,107,107,0.1); color: var(--danger); }
.dashboard-card .card-icon.warning { background: rgba(254,202,87,0.1); color: var(--warning); }

.dashboard-card .card-label {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 5px;
}

.dashboard-card .card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.dashboard-card .card-change {
    font-size: 13px;
    margin-top: 8px;
}

.dashboard-card .card-change.positive { color: var(--secondary); }
.dashboard-card .card-change.negative { color: var(--danger); }

/* ===== Charts ===== */
.chart-container {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

/* ===== Tables ===== */
.table-container {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.table-container .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-container .table-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-container .table-filters input,
.table-container .table-filters select {
    padding: 8px 12px;
    border: 2px solid #E8ECF1;
    border-radius: 8px;
    font-size: 14px;
}

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

.table-container table th {
    text-align: left;
    padding: 12px 16px;
    background: #F8F9FA;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray);
    border-bottom: 2px solid #E8ECF1;
}

.table-container table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F0F2F5;
    font-size: 14px;
}

.table-container table tr:hover {
    background: #F8F9FA;
}

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

.status-badge.pending { background: #FFF3CD; color: #856404; }
.status-badge.approved { background: #D4EDDA; color: #155724; }
.status-badge.rejected { background: #F8D7DA; color: #721C24; }
.status-badge.completed { background: #D1ECF1; color: #0C5460; }

/* ===== Forms ===== */
.form-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

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

.form-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E8ECF1;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
}

.form-card .btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.form-card .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,99,255,0.3);
}

/* ===== Chat ===== */
.chat-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-message .bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    background: #F0F2F5;
}

.chat-message.user .bubble {
    background: var(--primary);
    color: var(--white);
}

.chat-message .bubble .time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #E8ECF1;
    display: flex;
    gap: 12px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E8ECF1;
    border-radius: 8px;
    font-size: 15px;
}

.chat-input input:focus {
    border-color: var(--primary);
    outline: none;
}

.chat-input .btn {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.chat-typing {
    padding: 10px 20px;
    font-size: 14px;
    color: var(--gray);
    font-style: italic;
}

/* ===== Notification Dropdown ===== */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.notification-dropdown.show {
    display: block;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #F0F2F5;
    cursor: pointer;
}

.notification-item:hover {
    background: #F8F9FA;
}

.notification-item.unread {
    background: rgba(108,99,255,0.05);
    border-left: 3px solid var(--primary);
}

.notification-item .time {
    font-size: 12px;
    color: var(--gray);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .top-header .toggle-sidebar {
        display: block;
    }
    
    .top-header .wallet-balance {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .top-header .user-profile .username {
        display: none;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .login-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .table-container .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
}