/* Frontend Styles - WhatsApp Mass Sender */
:root {
    --wms-primary: #160022;
    --wms-secondary: #45006D;
    --wms-accent: #6B46C1;
    --wms-success: #10B981;
    --wms-warning: #F59E0B;
    --wms-error: #EF4444;
    --wms-light: #F8FAFC;
    --wms-dark: #1E293B;
}

.wms-dashboard {
    background: linear-gradient(135deg, var(--wms-primary) 0%, var(--wms-secondary) 100%);
    min-height: 100vh;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wms-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wms-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.wms-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.wms-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin: 0;
}

.wms-logo {
    width: 60px;
    height: 60px;
    border-radius: 10px;
}

.wms-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wms-stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.wms-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.wms-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    display: block;
}

.wms-stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wms-main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.wms-campaign-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wms-sidebar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
}

.wms-form-section {
    margin-bottom: 30px;
}

.wms-form-section h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.wms-form-group {
    margin-bottom: 20px;
}

.wms-form-group label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.wms-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wms-form-control:focus {
    outline: none;
    border-color: var(--wms-accent);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
}

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

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

.wms-contacts-textarea {
    min-height: 200px;
    font-family: monospace;
    font-size: 0.9rem;
}

.wms-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.wms-delay-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.wms-file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.wms-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wms-file-upload-label {
    display: block;
    padding: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wms-file-upload:hover .wms-file-upload-label {
    border-color: var(--wms-accent);
    background: rgba(255, 255, 255, 0.05);
}

.wms-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.wms-btn-primary {
    background: linear-gradient(45deg, var(--wms-accent), #8B5CF6);
    color: white;
}

.wms-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(107, 70, 193, 0.4);
}

.wms-btn-success {
    background: linear-gradient(45deg, var(--wms-success), #059669);
    color: white;
}

.wms-btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
}

.wms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wms-campaigns-list {
    margin-top: 30px;
}

.wms-campaign-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.wms-campaign-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wms-campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wms-campaign-name {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.wms-campaign-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.wms-status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--wms-warning);
    border: 1px solid var(--wms-warning);
}

.wms-status-running {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 1px solid #3B82F6;
}

.wms-status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--wms-success);
    border: 1px solid var(--wms-success);
}

.wms-status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--wms-error);
    border: 1px solid var(--wms-error);
}

.wms-campaign-progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    margin: 10px 0;
}

.wms-progress-bar {
    height: 100%;
    background: linear-gradient(45deg, var(--wms-success), #059669);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.wms-campaign-stats {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.wms-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.wms-alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--wms-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.wms-alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--wms-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.wms-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--wms-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.wms-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: wms-spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 10px;
}

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

.wms-api-settings {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.wms-api-tabs {
    display: flex;
    margin-bottom: 20px;
}

.wms-api-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px 5px 0 0;
}

.wms-api-tab:first-child {
    border-radius: 10px 0 0 0;
}

.wms-api-tab:last-child {
    border-radius: 0 10px 0 0;
}

.wms-api-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.wms-api-content {
    display: none;
}

.wms-api-content.active {
    display: block;
}

@media (max-width: 768px) {
    .wms-main-content {
        grid-template-columns: 1fr;
    }
    
    .wms-stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wms-delay-group {
        grid-template-columns: 1fr;
    }
    
    .wms-header h1 {
        font-size: 2rem;
        flex-direction: column;
    }
    
    .wms-campaign-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wms-campaign-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .wms-dashboard {
        padding: 10px;
    }
    
    .wms-campaign-form,
    .wms-sidebar {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .wms-stats-overview {
        grid-template-columns: 1fr;
    }
    
    .wms-stat-number {
        font-size: 2rem;
    }
    
    .wms-header h1 {
        font-size: 1.8rem;
    }
}
