:root {
    /* Shoppi Brand Colors */
    --primary-color: #faa11b;
    /* Shoppi Orange */
    --primary-hover: #e39016;
    --primary-light: #fffcf5;

    --secondary-color: #ef4438;
    /* Shoppi Red */
    --accent-color: #2c2c3e;
    /* Shoppi Dark Text */

    --success-color: #00C48C;
    --warning-color: #FFCF5C;
    --danger-color: #FF3B30;

    /* Neutrals */
    --dark-color: #111827;
    /* Near Black */
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --bg-main: #F3F4F6;
    --sidebar-bg: #FFFFFF;

    /* Effects */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--dark-color);
    line-height: 1.5;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--primary-color);
}

/* ==================== LOGIN VIEW ==================== */

/* Fix Bootstrap fade class opacity issue */
.tab-pane.active,
.tab-pane.show {
    opacity: 1 !important;
    display: block !important;
}

.login-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo img {
    filter: brightness(0) invert(1);
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-tabs .nav-tabs {
    border-bottom: none;
    background: #f8f9fa;
}

.login-tabs .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 15px 30px;
}

.login-tabs .nav-link.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.login-form {
    padding: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.login-form .form-control {
    height: 45px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 14px;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.login-form .btn-primary {
    height: 45px;
    border-radius: 8px;
    background: var(--primary-color);
    border: none;
    font-weight: 600;
    transition: all 0.3s;
}

.login-form .btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.login-links {
    text-align: center;
    margin-top: 20px;
}

.login-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.language-selector-container {
    padding: 20px;
    border-top: 1px solid #eee;
}

.language-flags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.language-flags img {
    width: 30px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s;
}

.language-flags img:hover {
    transform: scale(1.2);
}

.app-download-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.app-download-links img {
    height: 40px;
    transition: transform 0.2s;
}

.app-download-links img:hover {
    transform: scale(1.05);
}

.login-footer {
    text-align: center;
    color: white;
    margin-top: 30px;
}

.login-footer .footer-links {
    margin-top: 15px;
}

.login-footer .footer-links a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    opacity: 0.8;
}

.login-footer .footer-links a:hover {
    opacity: 1;
}

/* ==================== DASHBOARD VIEW ==================== */

.dashboard-view {
    background: var(--bg-main);
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.dashboard-logo img {
    height: 36px;
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-container input {
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    background: var(--light-color);
    transition: var(--transition);
}

.search-container input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-profile-widget:hover {
    background: white;
    border-color: var(--border-color);
    box-shadow: var(--card-shadow);
}

.user-info-text {
    line-height: 1.2;
}

.user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wallet-info {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--dark-color);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wallet-info #u_currency {
    color: var(--text-muted);
    font-weight: 500;
}

.wallet-info #u_wallet {
    color: var(--primary-color);
    font-weight: 700;
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.dashboard-main {
    padding: 1.5rem 0;
}

.dashboard-sidebar {
    background: var(--sidebar-bg);
    border-radius: 16px;
    padding: 1.25rem;
    height: fit-content;
    border: 1px solid var(--border-color);
}

.sidebar-nav .nav-link {
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

.dashboard-content {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    min-height: 700px;
    box-shadow: var(--card-shadow);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page_heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

/* ==================== TABLES ==================== */

.table {
    margin-top: 20px;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* ==================== BADGES ==================== */

.badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.badge-pending {
    background: var(--warning-color);
    color: white;
}

.badge-paid {
    background: var(--success-color);
    color: white;
}

.badge-cancelled {
    background: var(--danger-color);
    color: white;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .dashboard-sidebar {
        margin-bottom: 20px;
    }

    .user-menu {
        flex-direction: column;
        align-items: flex-end;
    }

    .search-container {
        margin-bottom: 15px;
    }
}

/* ==================== MODERN BUTTON STYLES ==================== */

/* Primary Buttons - Solid, visible, modern */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(93, 95, 239, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(93, 95, 239, 0.3);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

/* Outline Primary - Now with visible background */
.btn-outline-primary {
    background: rgba(93, 95, 239, 0.08);
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 95, 239, 0.25);
}

/* Small buttons */
.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Info buttons (for domain connect, etc) */
.btn-info,
.btn-outline-info {
    background: rgba(28, 200, 238, 0.1);
    border: 1.5px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: 600;
    transition: var(--transition);
}

.btn-info:hover,
.btn-outline-info:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 200, 238, 0.25);
}

/* Success buttons */
.btn-success {
    background: var(--success-color);
    border: none;
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.btn-success:hover {
    background: #00a876;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 196, 140, 0.25);
}

/* Danger buttons */
.btn-danger {
    background: var(--danger-color);
    border: none;
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #e6342a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.25);
}

/* Connect domain button specific fix */
.connect_domain {
    background: rgba(28, 200, 238, 0.1) !important;
    color: var(--secondary-color) !important;
    border: 1.5px solid var(--secondary-color) !important;
    font-weight: 600;
}

.connect_domain:hover {
    color: white !important;
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 200, 238, 0.25);
}

/* Order details button - make it pop! */
.order_details {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(93, 95, 239, 0.25);
}

.order_details:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(93, 95, 239, 0.35);
}

/* ==================== CARDS & BOXES ==================== */

.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.c-box--wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

/* ==================== EMPTY STATES ==================== */

.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* Ensure modal visibility */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}