/* ================================================================
   VIP Customer Management System - Dark Blue Theme
   Base Design System
   ================================================================ */

:root {
    /* Dark Blue Base Colors */
    --dark-bg-primary: #000000;
    --dark-bg-secondary: #0a0a1a;
    --dark-bg-tertiary: #000814;
    --dark-blue-primary: #4169E1;
    --dark-blue-secondary: #1e3a8a;
    --dark-blue-hover: #2980b9;

    /* Functional Colors */
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #8b9dc3;
    --text-muted: #718096;

    /* Component Styling */
    --border-radius: 10px;
    --border-radius-lg: 20px;
    --box-shadow: 0 0 40px rgba(65, 105, 225, 0.4), 0 0 80px rgba(65, 105, 225, 0.2);
    --box-shadow-sm: 0 0 20px rgba(65, 105, 225, 0.3);
    --transition: all 0.3s ease;

    /* Layout */
    --sidebar-width: 260px;
    --navbar-height: 60px;
}

/* ================================================================
   Global Resets and Base Styles
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000000;
    background: linear-gradient(135deg, #000000 0%, #0a0a1a 50%, #000814 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
}

/* Background light effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(65, 105, 225, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ================================================================
   Container Components
   ================================================================ */

.container,
.main-container {
    position: relative;
    z-index: 10;
}

.main-content {
    padding: 1.5rem;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: calc(100vh - var(--navbar-height));
    position: relative;
    z-index: 10;
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }
}

/* ================================================================
   Cards
   ================================================================ */

.card {
    background: rgba(10, 10, 30, 0.85);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    border: 2px solid rgba(65, 105, 225, 0.3);
    padding: 0;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 50px rgba(65, 105, 225, 0.5), 0 0 100px rgba(65, 105, 225, 0.3);
}

.card-header {
    background: rgba(65, 105, 225, 0.1);
    border-bottom: 1px solid rgba(65, 105, 225, 0.3);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

/* ================================================================
   Forms
   ================================================================ */

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea,
.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(65, 105, 225, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus,
.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(65, 105, 225, 0.7);
    box-shadow: 0 0 15px rgba(65, 105, 225, 0.3);
}

select {
    cursor: pointer;
}

select option {
    background: #0a0a1a;
    color: var(--text-primary);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ================================================================
   Checkboxes and Radio Buttons
   ================================================================ */

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--dark-blue-primary);
}

/* ================================================================
   Buttons
   ================================================================ */

button,
.btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #4169E1 0%, #1e3a8a 100%);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4);
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(65, 105, 225, 0.6);
    color: var(--text-primary);
}

button:active,
.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #4169E1 0%, #1e3a8a 100%);
}

.btn-secondary,
.secondary-btn {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.4) !important;
}

.btn-secondary:hover,
.secondary-btn:hover {
    box-shadow: 0 6px 25px rgba(30, 41, 59, 0.6) !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e67e22 100%);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.button-group button,
.button-group .btn {
    flex: 1;
    min-width: 120px;
}

/* ================================================================
   Tables
   ================================================================ */

.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid rgba(65, 105, 225, 0.3);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    background: rgba(65, 105, 225, 0.1);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid rgba(65, 105, 225, 0.1);
    color: var(--text-secondary);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(65, 105, 225, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(65, 105, 225, 0.15);
    cursor: pointer;
}

/* ================================================================
   Result Box / Info Box
   ================================================================ */

.result-box {
    margin-top: 25px;
    padding: 18px;
    background: rgba(65, 105, 225, 0.1);
    border: 1.5px solid rgba(65, 105, 225, 0.3);
    border-radius: var(--border-radius);
    word-break: break-all;
}

.result-box p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.result-box span {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

/* ================================================================
   Alerts and Warnings
   ================================================================ */

.alert {
    padding: 12px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: none;
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1.5px solid rgba(46, 204, 113, 0.4);
    color: #2ecc71;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.15);
    border: 1.5px solid rgba(243, 156, 18, 0.4);
    color: #f39c12;
}

.alert-info {
    background: rgba(52, 152, 219, 0.15);
    border: 1.5px solid rgba(52, 152, 219, 0.4);
    color: #3498db;
}

.warning {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    padding: 12px;
    border-radius: var(--border-radius);
    color: #fca5a5;
    font-size: 13px;
    text-align: center;
    margin-top: 15px;
}

/* ================================================================
   Badges
   ================================================================ */

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 30px;
    font-size: 0.8rem;
}

.badge-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.badge-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.4);
}

.badge-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.4);
}

.badge-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.badge-primary {
    background-color: rgba(65, 105, 225, 0.2);
    color: #4169E1;
    border: 1px solid rgba(65, 105, 225, 0.4);
}

/* ================================================================
   Responsive Design
   ================================================================ */

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .container {
        max-width: 100%;
    }

    h1 {
        font-size: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button,
    .button-group .btn {
        width: 100%;
    }
}

/* ================================================================
   Utility Classes
   ================================================================ */

.text-primary { color: var(--dark-blue-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-white { color: var(--text-primary) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-dark { background-color: rgba(10, 10, 30, 0.85) !important; }
.bg-transparent { background-color: transparent !important; }
