:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.auth-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 28px;
}

.auth-box h2 {
    text-align: center;
    color: var(--secondary);
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    font-size: 20px;
    color: white;
}

.sidebar-header span {
    font-size: 12px;
    color: var(--secondary);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu a svg {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--dark);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 18px;
    color: var(--dark);
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}

.stat-card.primary {
    background: var(--primary);
}

.stat-card.primary h3,
.stat-card.primary .value {
    color: white;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--light);
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

table tr:hover {
    background: var(--light);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.package-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.package-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
}

.package-card .sms-count {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.package-card .sms-label {
    color: var(--secondary);
    margin-bottom: 15px;
}

.package-card .price {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
}

/* SMS Balance Widget */
.sms-balance {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.sms-balance h3 {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.sms-balance .balance {
    font-size: 48px;
    font-weight: 700;
}

.sms-balance .label {
    opacity: 0.8;
}

/* Payment Instructions */
.payment-box {
    background: #f0f9ff;
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.payment-box h3 {
    color: #0284c7;
    margin-bottom: 15px;
}

.payment-steps {
    list-style: none;
}

.payment-steps li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
}

.payment-steps li::before {
    content: counter(step);
    counter-increment: step;
    position: absolute;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.payment-steps {
    counter-reset: step;
}

/* Contact import */
.import-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
}

.import-zone:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.import-zone input[type="file"] {
    display: none;
}

.import-zone label {
    cursor: pointer;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary);
}

.modal-body {
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .auth-box {
        padding: 30px 20px;
    }
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--secondary);
    margin-top: 5px;
}

/* Checkbox list */
.contact-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item input[type="checkbox"] {
    margin-right: 12px;
}

.select-all {
    background: var(--light);
    padding: 10px 15px;
    font-weight: 600;
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ... existing code ... */

/* ================================
   MOBILE MENU STYLES
================================ */

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Hamburger Icon */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation - X when open */
.mobile-menu-btn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Mobile Sidebar Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        pointer-events: auto;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    
    .sidebar.active {
        left: 0;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3);
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 80px 15px 30px 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-block {
        width: 100%;
    }
    
    /* Form controls */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Auth pages */
    .auth-box {
        margin: 15px;
        padding: 30px 20px;
    }
    
    /* SMS Balance indicator mobile */
    .sms-balance {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 15px;
        text-align: center;
    }
    
    /* Contact list mobile */
    .contact-list {
        max-height: 250px;
    }
    
    /* Modal mobile */
    .modal {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-content {
        padding: 75px 10px 20px 10px;
    }
    
    .mobile-menu-btn {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .hamburger span {
        width: 20px;
        height: 2.5px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-card .value {
        font-size: 28px;
    }
    
    .package-card {
        padding: 25px 20px;
    }
    
    .package-card .sms-count {
        font-size: 36px;
    }
    
    .auth-box h1 {
        font-size: 24px;
    }
    
    .auth-box h2 {
        font-size: 16px;
    }
}

/* Sidebar scrollable on mobile */
@media (max-width: 768px) {
    .sidebar {
        overflow-y: auto;
    }
    
    .sidebar-menu {
        padding-bottom: 120px;
    }
}

/* Smooth animations for sidebar links on mobile */
.sidebar.active .sidebar-menu a {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar.active .sidebar-menu a:nth-child(1) { animation-delay: 0.1s; }
.sidebar.active .sidebar-menu a:nth-child(2) { animation-delay: 0.15s; }
.sidebar.active .sidebar-menu a:nth-child(3) { animation-delay: 0.2s; }
.sidebar.active .sidebar-menu a:nth-child(4) { animation-delay: 0.25s; }
.sidebar.active .sidebar-menu a:nth-child(5) { animation-delay: 0.3s; }
.sidebar.active .sidebar-menu a:nth-child(6) { animation-delay: 0.35s; }
.sidebar.active .sidebar-menu a:nth-child(7) { animation-delay: 0.4s; }
.sidebar.active .sidebar-menu a:nth-child(8) { animation-delay: 0.45s; }

/* Pulse effect on menu button when menu is closed */
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(37, 99, 235, 0.6); }
}

.mobile-menu-btn:not(.active) {
    animation: pulse 2s infinite;
}

.mobile-menu-btn.active {
    animation: none;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ... existing code ... */

/* Dashboard Grid for side-by-side cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Card header with flex for title + button */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}