/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    margin: 0;
    /* background: #f8f9fa; */
    color: #2a3652;
}

/* Layout Components */
.container {
    padding: 36px 32px 32px 32px;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.admin-container {
    max-width: 800px;
    margin: 60px auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.auth-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 350px;
}

/* Header and Navigation */
.header-nav {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
}

.header-nav span {
    margin-right: 1.5rem;
    color: #333;
    font-weight: 500;
}

.header-nav a {
    margin-right: 1.5rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.header-nav a:hover {
    text-decoration: underline;
}

.logout-btn {
    padding: 0.5rem 1.2rem;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

/* Typography */
h1, h2, h3 {
    color: #2a3652;
    margin-top: 0;
}

h1 {
    text-align: center;
}

h2 {
    margin-top: 2rem;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

label {
    font-weight: 600;
    color: #2a3652;
    margin-bottom: 4px;
    display: block;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
textarea, 
select {
    border: 1.5px solid #d1d9e6;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1em;
    background: #f7fafd;
    transition: border 0.2s, background 0.2s;
    font-family: inherit;
    width: 100%;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
textarea:focus, 
select:focus {
    border: 1.5px solid #4f8cff;
    outline: none;
    background: #fff;
}

textarea {
    min-height: 60px;
    resize: vertical;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%237a8ca3" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
}

/* Buttons */
.themed-btn, 
.nav-btn, 
.auth-btn {
    background: #4f8cff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79,140,255,0.10);
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.themed-btn:hover, 
.nav-btn:hover, 
.auth-btn:hover {
    background: #357ae8;
    box-shadow: 0 4px 16px rgba(79,140,255,0.13);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #b0c4de !important;
}

.nav-btn:disabled:hover {
    background: #b0c4de !important;
}

.danger-btn {
    background: #e74c3c !important;
    color: #fff !important;
}

.danger-btn:hover {
    background: #c0392b !important;
}

/* Step Indicator */
#step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5eaf3;
    color: #7a8ca3;
    font-weight: 500;
    font-size: 1.1em;
    margin: 0 8px;
    transition: background 0.2s, color 0.2s;
}

.step.active {
    background: #4f8cff;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(79,140,255,0.10);
}

.step-label {
    margin-left: 8px;
    margin-right: 16px;
    color: #2a3652;
    font-size: 1em;
    font-weight: 500;
}

/* Layout Components */
.step3-flex {
    display: flex;
    flex-direction: row;
    gap: 32px;
    width: 100%;
}

.step3-left {
    flex: 3 1 0;
    min-width: 0;
}

.step3-right {
    flex: 2 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    height: 100%;
}

.qa-section {
    background: #f7fafd;
    border: 1.5px solid #e5eaf3;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(60, 80, 120, 0.04);
    font-size: 1.08em;
    color: #2a3652;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

#interview-log {
    height: 248px;
    overflow-y: auto;
}

#answer {
    height: 600px;
    overflow-y: auto;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

th {
    background: #f1f1f1;
    font-weight: 600;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

/* Toggle Buttons */
.toggle-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    min-width: 60px;
    transition: opacity 0.2s;
}

.toggle-btn.active {
    background: #28a745;
    color: white;
}

.toggle-btn.inactive {
    background: #dc3545;
    color: white;
}

.toggle-btn.superuser {
    background: #007bff;
    color: white;
}

.toggle-btn.user {
    background: #6c757d;
    color: white;
}

.toggle-btn:hover {
    opacity: 0.8;
}

.toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6c757d !important;
}

/* Form Inline */
.form-inline {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

.form-inline input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-inline button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.form-inline button:hover {
    background: #0056b3;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
}

.actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6c757d !important;
}

/* Messages */
.message, .auth-message {
    margin-top: 1rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
}

.message.success, .auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error, .auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Auth Specific */
.auth-header {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch a {
    color: #007bff;
    text-decoration: none;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Step-specific styles */
#step2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
}

#audio-form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto;
}

#start-recording-btn, #get-answer-btn {
    width: auto;
    min-width: 140px;
    max-width: 100%;
    margin: 0;
}

.step3-btn-row button {
    margin-bottom: 0;
}

p {
    margin-top: 7px;
    margin-bottom: 7px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .step3-flex {
        flex-direction: column;
        gap: 20px;
    }
    
    .step3-left, .step3-right {
        flex: 1 1 0;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-nav {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px 16px;
    }
    
    .auth-box {
        width: 90%;
        margin: 0 1rem;
    }
    
    #step-indicator {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .step-label {
        margin: 0 4px;
    }
}

/* Print Styles */
@media print {
    .header-nav,
    .nav-btn,
    .themed-btn,
    .auth-btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        padding: 0;
    }
}
