/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first approach */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navbar - Mobile First */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    padding: 0.5rem;
}

.nav-menu a:hover,
.nav-menu a:active {
    opacity: 0.8;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.user-info {
    color: #ecf0f1;
    padding: 0.5rem 1rem;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 1rem 0;
}

/* Alerts - Touch Friendly */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    font-size: 0.95rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Cards - Mobile First */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.card-warning {
    border-left: 4px solid #ffc107;
}

.card-success {
    border-left: 4px solid #28a745;
}

.big-text {
    font-size: 1.75rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

/* Forms - Touch Friendly */
.form-container, .auth-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
}

.auth-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    /* Better touch targets */
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

/* Buttons - Touch Friendly (44px minimum) */
.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    min-height: 44px;
    min-width: 44px;
    /* Prevent text selection on double-tap */
    -webkit-user-select: none;
    user-select: none;
    /* Better touch feedback */
    -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover,
.btn-primary:active {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    margin-left: 0.5rem;
}

.btn-secondary:hover,
.btn-secondary:active {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover,
.btn-danger:active {
    background-color: #c0392b;
}

/* Tables - Mobile Responsive */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
}

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

.data-table thead {
    background-color: #34495e;
    color: white;
}

.data-table th,
.data-table td {
    padding: 0.875rem;
    text-align: left;
    font-size: 0.9rem;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tbody tr:active {
    background-color: #e9ecef;
}

/* Status badges - Touch Friendly */
.status-pending,
.status-verified,
.status-rejected {
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background-color: #ffc107;
    color: #856404;
}

.status-verified {
    background-color: #28a745;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

/* Sections */
.section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.25rem;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Utility classes */
.text-danger {
    color: #dc3545;
}

.success-text {
    color: #28a745;
    font-weight: 500;
}

.auth-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.info-box {
    background-color: #e3f2fd;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2196f3;
}

.info-box p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.dashboard h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* ========================================
   TABLET RESPONSIVE (min-width: 600px)
   ======================================== */
@media (min-width: 600px) {
    .container {
        padding: 0 20px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .nav-brand a {
        font-size: 1.5rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .section {
        padding: 2rem;
    }

    .big-text {
        font-size: 2rem;
    }

    .dashboard h1 {
        font-size: 1.75rem;
    }
}

/* ========================================
   DESKTOP RESPONSIVE (min-width: 768px)
   ======================================== */
@media (min-width: 768px) {
    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav-menu {
        font-size: 1rem;
        gap: 1.5rem;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .main-content {
        padding: 2rem 0;
    }

    .data-table th,
    .data-table td {
        padding: 1rem;
        font-size: 1rem;
    }

    .dashboard h1 {
        font-size: 2rem;
    }
}

/* ========================================
   LARGE DESKTOP (min-width: 1024px)
   ======================================== */
@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ======================================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Improve touch scrolling on mobile */
.data-table {
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus (iOS) */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Better image handling */
img {
    max-width: 100%;
    height: auto;
}
