:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --secondary: #075E54;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
    --info: #17a2b8;
    --dark: #1a1a2e;
    --darker: #16213e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    min-height: 100vh;
    color: var(--white);
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.1);
}

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

.login-logo i {
    font-size: 60px;
    color: var(--primary);
}

.login-logo h1 {
    font-size: 24px;
    margin-top: 10px;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.05);
    color: var(--white);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
}

.form-control::placeholder {
    color: rgba(255,255,255,0.4);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

/* App Layout */
.app-container {
    padding-bottom: 80px;
}

/* Header */
.header {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
}

.header-title i {
    color: var(--primary);
    margin-right: 8px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary);
}

.nav-item.active {
    background: rgba(37, 211, 102, 0.1);
}

/* Main Content */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.card:hover {
    background: rgba(255,255,255,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-title i {
    color: var(--primary);
    margin-right: 8px;
}

/* Client Card */
.client-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.client-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-phone {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.client-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(37, 211, 102, 0.2);
    color: var(--primary);
    margin-top: 5px;
    display: inline-block;
}

.client-actions {
    display: flex;
    gap: 8px;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.custom-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox i {
    color: var(--white);
    font-size: 14px;
    opacity: 0;
    transition: var(--transition);
}

.custom-checkbox.checked i {
    opacity: 1;
}

input[type="checkbox"] {
    display: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning);
}

.status-sent {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info);
}

.status-failed {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

.status-paid {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

/* Queue Item */
.queue-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.queue-item-info {
    flex: 1;
}

.queue-item-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.queue-item-date {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 25px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--darker);
    width: 100%;
    max-width: 600px;
    border-radius: 20px 20px 0 0;
    padding: 30px 20px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    z-index: 90;
}

.fab:hover {
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.5);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInDown 0.3s ease;
    box-shadow: var(--shadow);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bulk Actions Bar */
.bulk-actions {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 15px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 95;
}

.bulk-actions.active {
    display: flex;
}

.bulk-count {
    font-weight: 600;
}

.bulk-btns {
    display: flex;
    gap: 10px;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Action Buttons Group */
.action-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-group .btn {
    flex: 1;
}

/* Settings List */
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 500;
}

.settings-value {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* Date/Time Picker Styling */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    color-scheme: dark;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .main-content {
        padding: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .modal-content {
        border-radius: var(--radius);
        margin: auto;
        max-height: 80vh;
    }
    
    .modal {
        align-items: center;
    }
}

/* Pull to refresh area */
.pull-indicator {
    text-align: center;
    padding: 15px;
    display: none;
}

/* Switch Toggle */
.switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    transition: var(--transition);
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid var(--danger);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid var(--success);
    color: #5fdb7d;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid var(--warning);
    color: #ffd93d;
}

/* Section Title */
.section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 15px;
    padding-left: 5px;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    padding-left: 45px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
}
