/**
 * Helvetica Investments & Wealth Management
 * Email Campaign System - Main Stylesheet
 */

:root {
    --primary-color: #1a4d7c;
    --secondary-color: #2c5f8d;
    --accent-color: #d4af37;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #1e2a3a;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333333;
    --text-muted: #6c757d;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f6f9;
}

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

a:hover {
    color: var(--secondary-color);
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sidebar-header .logo-subtitle {
    font-size: 11px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: rgba(255,255,255,0.85);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--accent-color);
}

.sidebar-menu a i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
}

.sidebar-footer .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: 600;
    color: var(--dark-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

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

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
}

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

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.notification-icon:hover {
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
}

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

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-color);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    border: none;
}

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

.card-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 15px 25px;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.stats-card.primary {
    border-left-color: var(--primary-color);
}

.stats-card.success {
    border-left-color: var(--success-color);
}

.stats-card.warning {
    border-left-color: var(--warning-color);
}

.stats-card.danger {
    border-left-color: var(--danger-color);
}

.stats-card.info {
    border-left-color: var(--info-color);
}

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

.stats-card.primary .stats-icon {
    background: rgba(26, 77, 124, 0.1);
    color: var(--primary-color);
}

.stats-card.success .stats-icon {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stats-card.warning .stats-icon {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.stats-card.danger .stats-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.stats-card.info .stats-icon {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.stats-card .stats-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stats-card .stats-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stats-card .stats-change {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

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

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

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

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

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

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

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

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

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

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

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

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 77, 124, 0.1);
}

.form-control:disabled {
    background: var(--light-color);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 0 -25px;
}

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

.table thead {
    background: var(--light-color);
}

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

.table td {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--light-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

.badge.bg-warning {
    background: var(--warning-color);
    color: var(--dark-color);
}

.badge.bg-info {
    background: var(--info-color);
    color: white;
}

.badge.bg-secondary {
    background: var(--text-muted);
    color: white;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--warning-color);
    color: #856404;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-left: 4px solid var(--info-color);
    color: var(--info-color);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 25px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Progress Bar */
.progress {
    height: 8px;
    background: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-bar.success {
    background: var(--success-color);
}

.progress-bar.danger {
    background: var(--danger-color);
}

.progress-bar.warning {
    background: var(--warning-color);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--light-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

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

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

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.login-header h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 13px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-body {
    padding: 40px 30px;
}

.login-footer {
    padding: 20px 30px;
    background: var(--light-color);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}