/* Main CSS file for Mgm Systems WhatsApp Demo */

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

:root {
    --primary-color: #25d366;
    --primary-hover: #20b357;
    --secondary-color: #007bff;
    --secondary-hover: #0056b3;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --gray-color: #6c757d;
    --gray-hover: #5a6268;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: var(--card-background);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.wide-container {
    max-width: 90vw;
    width: 90%;
}

.full-width-container {
    max-width: 95vw;
    width: 95%;
}

.logo {
    margin-bottom: 30px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 500;
}

p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: #fff;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    margin: 5px;
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

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

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

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

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

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

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

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

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

.btn-full {
    width: 100%;
    margin: 10px 0;
}

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

/* Navigation */
.nav-back {
    text-align: left;
    margin-bottom: 20px;
}

/* Alerts & Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d1edff;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Demo credentials display */
.demo-info {
    background: #f8f9fa;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.demo-info strong {
    color: var(--primary-color);
}

/* WhatsApp link */
.whatsapp-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin: 10px 0;
    transition: var(--transition);
}

.whatsapp-link:hover {
    background: var(--primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

tr:hover {
    background: #f8f9fa;
}

.body-text {
    max-width: 300px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Response messages */
#response {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 30px 20px;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .nav-back .btn {
        width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for accessibility */
.btn:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}