:root {
    --primary-color: #2563eb;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
}

#body-app {
    display: block;
    height: auto;
}

#app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
#btn-logout {
    padding: 8px 16px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
}
.tabs-container {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 10px;
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.tab-link:hover { background: #f1f5f9; }

.tab-link.active {
    background: white;
    border-color: #e2e8f0;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: -1px;
}

.action-bar {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    display: none; /* Hide by default */
}

.action-btn.visible {
    display: block; /* Show only when relevant */
}

.action-btn:hover { background: #e2e8f0; }

.action-item { position: relative; }

#form-area {
    display: none;
    background: white;
    border: 1px solid #cbd5e1;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#form-area.visible {
    display: block;
}

.action-form {
    display: none;
}

.action-form.visible {
    display: block;
}

.action-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

form div {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-sizing: border-box;
}

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

#data-table-container th, #data-table-container td {
    border: 1px solid #e2e8f0;
    padding: 12px;
    text-align: left;
}

#data-table-container th { background: #f8fafc; }

/* Login Page Styles */
#body-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f1f5f9;
}

#login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

#login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-section {
    padding: 10px 0;
}

.login-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #475569;
}

.section-desc {
    font-size: 0.85rem;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

#header-login h1 {
    margin-bottom: 24px;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 800;
}

#login-card h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

#login-card p {
    color: #64748b;
    margin-bottom: 32px;
}

.save-button {
    display: inline-block;
    text-align: center;
    margin-top: 10px;
    background-color: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  padding: 5px 10px;
}

/* Modal Styles */
#resultmodal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

#resultmodal.visible {
    display: flex;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-btn {
    margin-top: 20px;
    padding: 8px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.form-input {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-secondary, .btn-tertiary {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s;
}

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

.btn-tertiary {
    background-color: transparent;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover, .btn-tertiary:hover {
    filter: brightness(0.9);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #94a3b8;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    margin: 0 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#google-login-button {
    display: flex;
    justify-content: center;
}
