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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    z-index: -1;
    animation: backgroundMove 30s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.6s ease-out;
}

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

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #25d366, #128c7e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header::after {
    content: '📱💬';
    display: block;
    font-size: 2rem;
    margin-top: 10px;
    opacity: 0.7;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

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

.user-management {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(37, 211, 102, 0.2);
}

.user-stats {
    display: flex;
    gap: 1rem;
}

.stats-container {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(145deg, rgba(37, 211, 102, 0.1), rgba(18, 140, 126, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(37, 211, 102, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.2);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #25d366, #128c7e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    margin-top: 0.5rem;
}

.user-management-content {
    display: grid;
    grid-template-columns: minmax(350px, 400px) 1fr;
    gap: 2rem;
    padding: 0 2rem 2rem 2rem;
    min-width: 0;
}

.add-user-section {
    height: fit-content;
}

.add-user-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.add-user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.add-user-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.add-user-card p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Modern Form Styling */
.modern-user-form {
    text-align: left;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-wrapper input {
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
}

.input-wrapper input:focus,
.input-wrapper input:not(:placeholder-shown) {
    border-color: #25d366;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.15);
}

.input-wrapper label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.5rem;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    top: 0;
    left: 2.5rem;
    font-size: 0.8rem;
    color: #25d366;
    font-weight: 600;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-wrapper input:focus ~ .input-highlight {
    width: 100%;
}

.modern-add-btn {
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    position: relative;
    z-index: 2;
}

.btn-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modern-add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.3);
}

.modern-add-btn:hover .btn-ripple {
    width: 300px;
    height: 300px;
}

.modern-add-btn:hover .btn-icon {
    transform: rotate(180deg);
}

.modern-add-btn:active {
    transform: translateY(-1px);
}

.form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.add-user-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.add-user-btn span {
    font-size: 1rem;
}

.users-list-section {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
}

.users-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(37, 211, 102, 0.2);
}

.users-list-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.users-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 350px;
}

.modern-search {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.modern-search:focus {
    border-color: #25d366;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
    background: white;
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.9rem;
    pointer-events: none;
}

.refresh-users-btn {
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.refresh-users-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.modern-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    height: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 16px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Modern User Card Styling */
.user-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.1), transparent);
    transition: left 0.5s;
}

.user-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
}

.user-card:hover::before {
    left: 100%;
}

.user-info {
    position: relative;
    z-index: 2;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.user-phone {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-phone::before {
    content: '📱';
    font-size: 0.8rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.delete-user-btn {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-user-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 2px;
}

h3 {
    color: #555;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #25d366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.hidden {
    display: none !important;
}

.quick-params {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.param-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #555;
    font-size: 0.875rem;
}

.param-input {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.message-preview {
    background: linear-gradient(145deg, #dcf8c6, #c8e6c9);
    border: 2px solid #25d366;
    border-radius: 18px 18px 5px 18px;
    padding: 1.5rem;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
    color: #333;
}

.message-preview::before {
    content: '💬';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #25d366;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.message-preview.empty {
    color: #666;
    font-style: italic;
}

small {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.parameter-field {
    margin-top: 1rem;
}

.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.param-name, .param-value {
    padding: 0.5rem;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 0.875rem;
}

.param-name:focus, .param-value:focus {
    outline: none;
    border-color: #25d366;
}

.add-param-btn {
    background: #f8f9fa;
    color: #25d366;
    border: 2px dashed #25d366;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.5rem;
    width: auto;
    transition: all 0.3s;
}

.add-param-btn:hover {
    background: #25d366;
    color: white;
    transform: none;
}

.remove-param-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-param-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.user-search-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e1e1;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.user-dropdown.hidden {
    display: none;
}

.user-option {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.user-option:hover {
    background-color: #f8f9fa;
}

.user-option:last-child {
    border-bottom: none;
}

.selected-user {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e8f5e8;
    border-radius: 5px;
    border: 1px solid #25d366;
}

.selected-user.hidden {
    display: none;
}

.user-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.user-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.user-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #25d366;
}

.user-details {
    margin-bottom: 1rem;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #128c7e;
    margin-bottom: 0.25rem;
}

.user-phone {
    color: #666;
    font-size: 0.9rem;
}

.user-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.delete-user-btn {
    background: #fff;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
}

.delete-user-btn:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

button {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:active {
    transform: translateY(0);
}

.message-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #25d366;
}

.message-item strong {
    color: #128c7e;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status.scheduled {
    background: #fff3cd;
    color: #856404;
}

.status.sent {
    background: #d1edff;
    color: #004085;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
}

.notification.success {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.notification.success::before {
    content: '✅ ';
    margin-right: 8px;
}

.notification.error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.notification.error::before {
    content: '❌ ';
    margin-right: 8px;
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.notification.info::before {
    content: '💬 ';
    margin-right: 8px;
}

.notification.hidden {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
}

/* WhatsApp Setup Styles */
.whatsapp-setup {
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.whatsapp-setup.priority {
    margin-top: 0;
    margin-bottom: 2rem;
    border: 2px solid #ff9800;
    box-shadow: 0 25px 50px rgba(255, 152, 0, 0.15);
}

.whatsapp-setup.priority .whatsapp-setup-header h2::before {
    content: '⚠️ ';
    margin-right: 0.5rem;
}

.whatsapp-setup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.status-success {
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-warning {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-error {
    background: linear-gradient(145deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.status-info {
    background: linear-gradient(145deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.whatsapp-setup-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.info-card {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid #25d366;
}

.info-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.info-card ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.info-card li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.help-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.help-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.credentials-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.credentials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e5e9;
}

.credentials-header h3 {
    margin: 0;
}

.credentials-actions {
    display: flex;
    gap: 0.5rem;
}

.test-btn, .delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.test-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.credentials-form {
    padding: 2rem;
}

.credentials-form .form-group {
    margin-bottom: 1.5rem;
}

.credentials-form small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.8rem;
}

.save-credentials-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.save-credentials-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

/* Admin Management Styles */
.admin-management {
    margin-top: 2rem;
}

.admin-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-management-content {
    padding: 0 2rem 2rem 2rem;
}

.add-admin-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.add-admin-section h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.admin-register-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.admin-register-btn:hover {
    background: #0056b3;
}

.admins-list-section {
    background: white;
}

.admins-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.admins-list-header h3 {
    margin: 0;
}

.refresh-btn {
    padding: 0.5rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.refresh-btn:hover {
    background: #545b62;
}

.admins-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.admin-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.admin-card.first-admin {
    border: 2px solid #ffd700;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.95));
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.1), transparent);
    transition: left 0.5s;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.admin-card:hover::before {
    left: 100%;
}

.admin-info {
    position: relative;
    z-index: 2;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.admin-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.first-admin-badge {
    font-size: 0.8rem;
    color: #ffd700;
    font-weight: 500;
}

.admin-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.admin-status.status-active {
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-status.status-active::before {
    content: '🟢 ';
    margin-right: 4px;
}

.admin-status.status-pending {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.admin-status.status-pending::before {
    content: '🟡 ';
    margin-right: 4px;
}

.admin-created {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    margin-bottom: 2rem;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(37, 211, 102, 0.4);
}

.metric-icon {
    font-size: 3rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #25d366, #128c7e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .user-management-content {
        grid-template-columns: 1fr;
    }
    
    .users-list-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .users-search {
        flex: none;
    }
    
    .users-grid, .modern-users-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }
    
    .user-management-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .add-user-card {
        margin-bottom: 2rem;
    }
    
    .users-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-wrapper {
        flex: none;
    }
    
    .whatsapp-setup-content {
        grid-template-columns: 1fr;
    }
    
    .admin-management-content {
        grid-template-columns: 1fr;
    }
    
    .admins-list-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admins-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }
    
    .stat-item {
        padding: 0.8rem 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stats-container {
        gap: 1rem;
    }
}