/* CBC - Marketiseasy Styles */

:root {
    --primary-color: #6c5ce7;
    --primary-hover: #5b4cdb;
    --secondary-color: #00d9c0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --border-radius: 12px;
    --shadow: 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);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #ffffff;
    color: #334155;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    max-width: 180px;
    height: auto;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1e293b;
}

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

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

.nav-section {
    margin-bottom: 15px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 12px;
    border-left: 3px solid transparent;
}

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

.nav-link.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), transparent);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

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

.nav-link span {
    font-size: 14px;
    font-weight: 500;
}

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

/* Header */
.top-header {
    background: white;
    height: var(--header-height);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

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

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: var(--light-color);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.user-dropdown:hover {
    background: var(--light-color);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

.user-role {
    font-size: 12px;
    color: #94a3b8;
}

/* Content Area */
.content-area {
    padding: 30px;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: none;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stats-icon.primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.stats-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stats-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.stats-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

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

.stats-info p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background: var(--light-color);
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px;
    border: none;
    white-space: nowrap;
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

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

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

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

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

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

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

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.2s ease;
}

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

.form-label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
    font-size: 14px;
}

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

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

/* Modals */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px;
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 15px 20px;
}

/* Alert Boxes */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #64748b;
    margin-bottom: 10px;
}

.empty-state p {
    color: #94a3b8;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6c5ce7 0%, #00d9c0 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    padding: 50px;
}

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

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

.login-logo .logo-icon {
    width: 70px;
    height: 70px;
    font-size: 28px;
    margin: 0 auto 15px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
}

.login-logo h1 span {
    color: var(--primary-color);
}

.login-form h2 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
}

/* Data Table Customization */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 8px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    margin: 0 3px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 15px;
    }
    
    .stats-card {
        padding: 20px;
    }
    
    .stats-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stats-info h3 {
        font-size: 22px;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dropdown Menu */
.dropdown-menu {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--light-color);
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
}

/* Quote specific styles */
.quote-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.quote-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.quote-total {
    font-size: 32px;
    font-weight: 700;
}

/* File upload area */
.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.upload-area i {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.upload-area p {
    color: #64748b;
    margin: 0;
}

/* Switch/Toggle */
.form-switch .form-check-input {
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Landing Page Preview */
.landing-preview {
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.landing-preview-header {
    background: #f8fafc;
    padding: 10px 15px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #f59e0b; }
.preview-dot.green { background: #10b981; }

.landing-preview iframe {
    width: 100%;
    height: 400px;
    border: none;
}
