/* AMS DA Tool - Web Application Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fb 0%, #eef2ff 100%);
    color: #1f2937;
    padding: 20px;
}

#root {
    max-width: 1280px;
    margin: 0 auto;
}

.container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    padding: 24px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.app-title {
    font-size: 24px;
    color: #1d4ed8;
}

.subtitle {
    color: #64748b;
    margin-top: 4px;
    font-size: 13px;
}

.user-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.user-pill {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.section {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.section h3 {
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 10px;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.field-row:last-child {
    margin-bottom: 0;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.field-input {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field-readonly {
    background: #f1f5f9;
    cursor: default;
}

.field-small {
    width: 70px;
}

.field-date {
    width: 140px;
}

select.field-input {
    min-width: 120px;
}

input[type="text"].field-input {
    min-width: 150px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-secondary {
    background: #64748b;
    color: #fff;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.btn-active {
    background: #16a34a !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.btn-link {
    padding: 0;
    background: transparent;
    color: #2563eb;
    text-decoration: underline;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.error-msg, .message {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    display: inline-block;
    min-height: 28px;
}

.error-msg {
    color: #b91c1c;
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.message.success {
    color: #166534;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.message.error {
    color: #b91c1c;
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.message.info {
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 460px;
    max-width: 90%;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
}

.modal-content h2 {
    margin-bottom: 12px;
    color: #0f172a;
}

.modal-subtitle {
    color: #64748b;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.btn-full {
    width: 100%;
}

.login-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.resend-timer {
    color: #64748b;
    font-size: 12px;
}

.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.worklog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.worklog-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.worklog-table th {
    background: #2563eb;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.worklog-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.worklog-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.loading-state {
    padding: 20px;
    text-align: center;
    color: #64748b;
}
    color: #2c3e50;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input[type="email"],
.form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 3px rgba(52,152,219,0.3);
}

.form-group .btn {
    margin-top: 5px;
}

/* User bar */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f0f7ff;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #2c3e50;
}

.btn-logout {
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 4px 12px;
    font-size: 12px;
}

.btn-logout:hover {
    background: #e74c3c;
    color: #fff;
}

/* Login modal specific */
.login-content {
    max-width: 420px;
    text-align: center;
}

.login-content h2 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
}

.btn-full {
    width: 100%;
    padding: 10px;
    font-size: 15px;
}

.btn-link {
    background: transparent;
    color: #3498db;
    border: none;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: #2980b9;
}

.otp-input {
    width: 100%;
    text-align: center;
    font-size: 28px !important;
    letter-spacing: 10px;
    padding: 12px !important;
    font-family: 'Courier New', monospace;
}

.resend-timer {
    font-size: 13px;
    color: #888;
    padding: 4px 8px;
}

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.form-group input[type="text"]#login-code:focus {
    border-color: #27ae60;
    box-shadow: 0 0 5px rgba(39,174,96,0.3);
}

/* Success state */
.error-msg.success {
    color: #27ae60;
    border-color: #27ae60;
    background: #eafaf1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .field-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .field-input {
        width: 100% !important;
    }
    
    .modal-content {
        width: 95%;
    }
}