.ai-typing-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px 0;
    background: #eaf3fb;
    color: #3498db;
    border-radius: 10px;
    padding: 7px 14px 7px 11px;
    font-size: 1rem;
    box-shadow: 0 1px 4px #3498db11;
    width: fit-content;
    animation: fadeInTyping .3s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeInTyping {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
.spinner-chat {
    width: 18px;
    height: 18px;
    display: inline-block;
    position: relative;
}
.spinner-chat:after {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid #3498db;
    border-top: 2.5px solid #ffe082;
    animation: spinChat 0.8s linear infinite;
    box-sizing: border-box;
}
@keyframes spinChat {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #0f0f1e 0%, #1a1a2e 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Prevent horizontal overflow */
.main-header,
.page-container,
.card,
.auth-container,
.modal-content {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.main-header {
    width: 100%;
    background: linear-gradient(90deg, #1a2636 70%, #3498db 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px 0 32px;
    height: 68px;
    box-shadow: 0 4px 18px rgba(26,38,54,0.12);
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 10;
    animation: fadeInDown .7s cubic-bezier(.4,0,.2,1);
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-nav a,
.header-nav button {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-nav a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.header-nav button {
    background: #e74c3c;
    color: white;
}

.header-nav button:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

#userInfo {
    color: #2ecc71 !important;
    font-weight: 600;
    background: rgba(46, 204, 113, 0.1) !important;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
}
@media (max-width: 768px) {
    .main-header {
        padding: 0 15px;
        height: 60px;
        font-size: 1.1rem;
        flex-wrap: wrap;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .logo { 
        font-size: 1.4rem; 
        margin-right: 8px; 
    }
    
    .app-title { 
        font-size: 1.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-nav {
        gap: 8px;
    }
    
    .header-nav a,
    .header-nav button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .container { 
        padding: 18px 2vw; 
    }
    
    .main-footer { 
        font-size: .95rem; 
    }
}

@media (max-width: 480px) {
    .main-header {
        height: auto;
        min-height: 60px;
        padding: 10px 15px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-left {
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .header-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .header-nav a,
    .header-nav button {
        padding: 8px 12px;
        font-size: 11px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .app-title {
        font-size: 0.9em;
        text-align: center;
    }
}

.logo {
    font-size: 2.3rem;
    margin-right: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform .18s, color .18s;
}
.logo:hover {
    color: #ffe082;
    transform: scale(1.13) rotate(-8deg);
}
.app-title {
    font-weight: 700;
    letter-spacing: -1px;
    font-size: 1.35em;
    position: relative;
    display: inline-block;
}
.app-title:after {
    content: '';
    display: block;
    width: 42%;
    height: 3px;
    background: linear-gradient(90deg, #ffe082, #3498db);
    border-radius: 2px;
    margin-top: 5px;
    transition: width .25s;
}
.main-header:hover .app-title:after {
    width: 80%;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: none; }
}

.container {
    /*max-width: 540px;*/
    margin: 48px auto 0 auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 6px 32px rgba(44,62,80,0.10);
    padding: 44px 28px 32px 28px;
    min-height: 420px;
    animation: fadeInMain 0.7s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeInMain {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: none; }
}

/* Modern markdown table styling */
.markdown-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px #3498db11;
    margin: 18px 0 22px 0;
    font-size: 1.04em;
}
.markdown-body th, .markdown-body td {
    padding: 10px 14px;
    border-bottom: 1.5px solid #e1e8ed;
    border-right: 1.5px solid #e1e8ed;
    text-align: left;
    background: none;
    transition: background .18s;
}
.markdown-body th {
    background: #3498db11;
    color: #1a2636;
    font-weight: 600;
    border-bottom: 2.5px solid #3498db55;
}
.markdown-body tr:last-child html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Prevent horizontal overflow */
.main-header,
.page-container,
.card,
.auth-container,
.modal-content {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.markdown-body tr td:last-child, .markdown-body tr th:last-child {
    border-right: none;
}
.markdown-body tbody tr:nth-child(odd) td {
    background: #f3f7fb;
}
.markdown-body tbody tr:hover td {
    background: #eaf3fb;
}
.markdown-body table {
    border-radius: 12px;
    overflow: hidden;
}


h1 {
    text-align: left;
    color: #1a2636;
    font-size: 2.2rem;
    margin-bottom: 18px;
    letter-spacing: -1px;
}
form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    align-items: center;
}

/* Stock input styling for dark theme */
form input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #2a2a3a;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

form input[type="text"]::placeholder {
    color: #888;
}
button:disabled, input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #b6cbe0 !important;
}
button:active {
    box-shadow: 0 1px 3px rgba(52,152,219,0.09);
}

/* Spinner styles */
.spinner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px 0 24px 0;
    min-height: 60px;
}
.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

button:hover { background: #217dbb; }

.accordion {
    margin: 24px 0;
}
.accordion-item {
    background: #1e2a3a;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #3a4a5a;
    overflow: hidden;
}
.accordion-header {
    padding: 16px;
    background: #3498db;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
}
.accordion-content {
    padding: 16px;
    display: none;
    background: #2a3a4a;
    color: #e0e0e0;
}
.accordion-item.active .accordion-content {
    display: block;
}
.accordion-content h1, .accordion-content h2, .accordion-content h3 {
    color: #3498db;
    margin-top: 16px;
}
.accordion-content table {
    background: #1a2530;
    width: 100%;
    margin: 12px 0;
}
.accordion-content table th {
    background: #2c3e50;
    color: #3498db;
    padding: 10px;
    border: 1px solid #3a4a5a;
}
.accordion-content table td {
    padding: 8px 10px;
    border: 1px solid #3a4a5a;
    color: #e0e0e0;
}
.accordion-content pre {
    background: #1a2530;
    color: #e0e0e0;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
}
.progress-bar {
    width: 100px;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    display: inline-block;
    margin-right: 6px;
}
.progress-fill {
    height: 100%;
    transition: width 0.3s;
}
.progress-positive {
    background: #4caf50;
}
.progress-negative {
    background: #e53935;
}
.progress-neutral {
    background: #bdbdbd;
}

/* Meter bar for sentiment */
.meter-bar {
    width: 120px;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    position: relative;
    display: inline-block;
    margin: 0 8px 0 0;
}
.meter-fill {
    height: 100%;
    position: absolute;
    top: 0;
    transition: width 0.3s;
    border-radius: 6px;
}
.meter-fill.meter-neg {
    left: 0;
    background: #e53935;
    z-index: 1;
}
.meter-fill.meter-pos {
    right: 0;
    background: #4caf50;
    z-index: 1;
}
.meter-center {
    position: absolute;
    left: 50%;
    top: -2px;
    width: 2px;
    height: 16px;
    background: #aaa;
    z-index: 2;
    transform: translateX(-1px);
    border-radius: 2px;
}
.meter-score {
    min-width: 30px;
    display: inline-block;
    text-align: center;
    font-family: monospace;
    color: #333;
}

/* Gauge-like sentiment meter */
.meter-gauge {
    position: relative;
    width: 180px;
    height: 14px;
    display: inline-block;
    margin-right: 8px;
}
.meter-gauge .meter-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.82rem;
    font-family: monospace;
    color: #1a2636;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    pointer-events: none;
}
.meter-track {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, #e53935 0%, #cccccc 50%, #4caf50 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}
.meter-midline {
    position: absolute;
    left: 50%;
    top: -3px;
    width: 2px;
    height: 20px;
    background: #8d8d8d;
    transform: translateX(-1px);
    border-radius: 2px;
    z-index: 2;
}
.meter-needle {
    position: absolute;
    top: -6px;
    width: 0;
    height: 26px;
    border-left: 2px solid #1a2636;
    transform: translateX(-1px);
    z-index: 3;
}
.meter-needle:after {
    content: '';
    position: absolute;
    left: -5px;
    bottom: -4px;
    width: 10px;
    height: 10px;
    background: #1a2636;
    border-radius: 50%;
}
.meter-labels {
    display: flex;
    justify-content: space-between;
    width: 180px;
    font-size: 0.78rem;
    color: #555;
    margin: 4px 0 0 0;
}
#chatSection {
    margin-top: 32px;
    border-top: 1px solid #eee;
    padding-top: 24px;
}
#chatHistory {
    max-height: 200px;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.user-msg {
    text-align: right;
    color: #2980b9;
    margin-bottom: 4px;
}
.ai-msg {
    text-align: left;
    color: #16a085;
    margin-bottom: 4px;
}
@media (max-width: 600px) {
    .container { padding: 12px; }
    .accordion-header, .accordion-content { padding: 10px; }
}

/* ===== COMMON STYLES FOR ALL PAGES ===== */

/* Page Container */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 68px);
    width: 100%;
    box-sizing: border-box;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.page-header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Cards */
.card {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: center;
    justify-content: center;
    min-width: 120px;
}

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

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2980b9, #1f5f8b);
}

.btn-success {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #27ae60, #1e8449);
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
}

.btn-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #e67e22, #d35400);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 80px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    min-width: 160px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #2a2a3a;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-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 input::placeholder {
    color: #888;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
}

.message.show {
    display: flex;
}

.error-message {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border-left: 4px solid #a93226;
}

.success-message {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    border-left: 4px solid #1e8449;
}

.info-message {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border-left: 4px solid #1f5f8b;
}

.warning-message {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border-left: 4px solid #d35400;
}

/* Tables */
.table-container {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

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

.table-container th {
    background: linear-gradient(45deg, #2a2a3a, #333);
    color: #fff;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-container td {
    padding: 16px;
    border-top: 1px solid #333;
    color: #e0e0e0;
    font-size: 14px;
}

.table-container tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.badge-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.badge-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
}

.badge-info {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.badge-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #333;
    background: linear-gradient(45deg, #2a2a3a, #333);
}

.modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #fff;
}

/* Info Box */
.info-box {
    background: linear-gradient(45deg, #2a2a3a, #333);
    border-left: 4px solid #3498db;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #333;
}

.info-box p {
    margin: 5px 0;
    color: #e0e0e0;
    font-size: 14px;
}

.info-box strong {
    color: #3498db;
}

/* User Info Display */
.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.user-info-item {
    background: linear-gradient(45deg, #2a2a3a, #333);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #333;
}

.user-info-item label {
    color: #888;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-info-item .value {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Auth Container */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 0;
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    overflow: hidden;
    width: 90%;
    box-sizing: border-box;
}

.auth-header {
    background: linear-gradient(45deg, #2a2a3a, #333);
    padding: 25px;
    text-align: center;
    border-bottom: 2px solid #333;
}

.auth-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.auth-body {
    padding: 25px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-container {
        max-width: 95%;
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 15px 10px;
        margin: 0;
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card h2 {
        font-size: 1.2rem;
    }
    
    .user-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table-container table {
        min-width: 600px;
    }
    
    .auth-container {
        margin: 20px auto;
        width: 95%;
        max-width: 400px;
    }
    
    .auth-header,
    .auth-body {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 10px 5px;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 12px;
        border-radius: 8px;
    }
    
    .card h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .user-info-item {
        padding: 12px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .btn-large {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 60px;
    }
    
    .auth-container {
        margin: 10px auto;
        width: 98%;
    }
    
    .auth-header,
    .auth-body {
        padding: 15px;
    }
    
    .auth-header h2 {
        font-size: 1.4rem;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-container table {
        font-size: 12px;
        min-width: 500px;
    }
    
    .table-container th,
    .table-container td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .table-container .action-buttons {
        min-width: 120px;
    }
    
    .action-buttons {
        gap: 4px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px;
    }
    
    .info-box {
        padding: 12px;
        font-size: 13px;
    }
}
