/* assets/css/style.css */
/* Responsive Design - Works on all screen sizes */

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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #4CAF50;
    --info: #2196F3;
    --warning: #ff9800;
    --danger: #f44336;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #a0aec0;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    color: var(--dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 24px 30px;
}

.card-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.card-body {
    padding: 30px;
}

.card-footer {
    padding: 20px 30px;
    background: var(--light);
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: var(--light);
    color: var(--dark);
}

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

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

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

.btn-success:hover {
    background: #45a049;
    transform: translateY(-2px);
}

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

.btn-info:hover {
    background: #0b7dda;
    transform: translateY(-2px);
}

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

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

.btn-block {
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* QR Code Display */
.qr-container {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.qr-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.qr-image img {
    width: 100%;
    height: auto;
}

/* Info Box */
.info-box {
    background: #f0f4ff;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.info-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 600;
}

.info-box .name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark);
    margin-top: 5px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: none;
}

.alert.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid var(--info);
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid var(--warning);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

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

/* Phone Input Section */
.phone-input {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius-sm);
    animation: slideDown 0.3s ease;
}

.phone-input.active {
    display: block;
}

/* Status Messages */
.status {
    margin-top: 20px;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    display: none;
}

.status.loading {
    display: block;
    background: #e3f2fd;
    color: #1976d2;
}

.status.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
}

.status.error {
    display: block;
    background: #ffebee;
    color: #c62828;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.data-table tr:hover {
    background: var(--light);
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    margin-bottom: 30px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--white);
    font-size: 0.85rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-inactive {
    background: #ffebee;
    color: #c62828;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-header h1 {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .info-box .name {
        font-size: 1.2rem;
    }
    
    .navbar {
        flex-direction: column;
        text-align: center;
    }
    
    .navbar-nav {
        justify-content: center;
    }
    
    .col-3, .col-4, .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .card-header h1 {
        font-size: 1.2rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #1a202c;
        --dark: #f7fafc;
        --white: #2d3748;
    }
    
    .card {
        background: var(--white);
    }
    
    .info-box {
        background: #2d3748;
    }
    
    .form-control {
        background: #1a202c;
        color: var(--dark);
        border-color: #4a5568;
    }
}