:root {
    --primary: #0043A9;
    --primary-hover: #00317E;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.app-container {
    width: 100%;
    max-width: 400px;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 10px;
    margin-left: -5px;
}

h1 {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0.5rem;
}

p {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

select, input {
    padding: 0.8rem 1rem;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

select:focus, input:focus {
    border-color: var(--primary);
    background-color: #fff;
}

.input-row {
    display: flex;
    width: 100%;
}

.input-row select {
    width: 78px !important;
    flex: none;
}

.input-row input {
    flex: 1;
    width: auto;
}

input.code-input, input.pin-input {
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    font-family: monospace;
}

.btn {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(0, 67, 169, 0.2);
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn:active {
    transform: scale(0.98);
}

.footer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-text a:hover {
    text-decoration: underline;
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bounce {
    animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.success svg {
    color: #059669;
}

@media screen and (max-width: 768px) {
    body > *:not(.app-container) {
        display: none !important;
    }

    html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .app-container {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9999;
        overflow-y: auto; 
    }
}