/* Logicata Reports — Web UI */

:root {
    --orange: #f97316;
    --navy: #1a1f56;
    --blue: #3b82f6;
    --light-grey: #f3f4f6;
    --dark-grey: #374151;
    --white: #ffffff;
    --red: #ef4444;
    --green: #10b981;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light-grey);
    color: var(--dark-grey);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    background: var(--white);
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 40px;
}

header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy);
}

main {
    width: 100%;
    max-width: 500px;
    padding: 2rem 1rem;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    background: #e5e7eb;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--dark-grey);
    border-radius: 8px 8px 0 0;
}

.tab.active {
    background: var(--white);
    color: var(--orange);
    font-weight: 600;
}

.tab-content {
    display: none;
    background: var(--white);
    padding: 2rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

form {
    padding: 0;
}

.field {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--dark-grey);
}

input, select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.format-selector {
    display: flex;
    gap: 1rem;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
}

.format-option input[type="radio"] {
    width: auto;
    accent-color: var(--orange);
}

.actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

/* Status */
.status {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-grey);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Result */
.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--green);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result a {
    color: var(--blue);
    font-weight: 500;
    text-decoration: none;
}

.result a:hover {
    text-decoration: underline;
}

/* Error */
.error {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--red);
    color: var(--red);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- Auth UI --- */

.hidden {
    display: none !important;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--dark-grey);
}

.user-info span {
    opacity: 0.8;
}

.btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
    background: var(--light-grey);
    color: var(--dark-grey);
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-small:hover {
    background: #e5e7eb;
}

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    width: 100%;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 400px;
    width: 100%;
}

.login-card .login-logo {
    height: 40px;
    margin-bottom: 1.5rem;
}

.login-card h2 {
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.login-card p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.login-card .btn-primary {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
}
