:root {
    --primary: #177c41;
    --primary-dark: #056c39;
    --bg-color: #f4f7f6;
    --white: #ffffff;
    --text-main: #333;
    --text-light: #666;
    --border: #ddd;
    --sidebar-width: 250px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-color); color: var(--text-main); }

.screen { display: none; }
.screen.active { display: block; }

/* Login */
.login-box { max-width: 400px; margin: 100px auto; background: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-align: center; }
.login-logo { height: 50px; margin-bottom: 20px; }
.form-control { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; font-size: 0.95rem; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; }
.btn { padding: 10px 15px; border: none; border-radius: 4px; cursor: pointer; font-weight: 500; font-size: 0.95rem; display: inline-block; text-align: center; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { display: block; width: 100%; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.error-msg { color: red; font-size: 0.85rem; margin-top: 10px; }

/* Dashboard */
#dashboard-screen { display: none; height: 100vh; }
#dashboard-screen.active { display: flex; }

.sidebar { width: var(--sidebar-width); background: var(--white); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid var(--border); }
.nav-menu { list-style: none; margin-top: 20px; }
.nav-menu li { padding: 15px 20px; cursor: pointer; color: var(--text-light); display: flex; align-items: center; gap: 10px; }
.nav-menu li:hover, .nav-menu li.active { background: rgba(23, 124, 65, 0.1); color: var(--primary); border-right: 3px solid var(--primary); }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { background: var(--white); padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.content-wrapper { padding: 20px; overflow-y: auto; flex: 1; }

.view-section { display: none; }
.view-section.active { display: block; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border: 1px solid var(--border); }
.data-table th { background: #f9fafb; font-weight: 600; font-size: 0.9rem; color: var(--text-light); }
.data-table td img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.action-btns button { padding: 5px 10px; font-size: 0.8rem; margin-right: 5px; cursor: pointer; }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: var(--white); padding: 30px; border-radius: 8px; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-lg { max-width: 700px; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; color: var(--text-light); }
.modal h3 { margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.modal-footer { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); padding-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Dynamic Fields */
.dynamic-fields-section { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border); }
.help-text { font-size: 0.85rem; color: var(--text-light); margin-bottom: 10px; }
.dynamic-field-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.dynamic-field-row input { flex: 1; }
.btn-remove-field { color: red; background: none; border: none; cursor: pointer; font-size: 1.2rem; }

/* Quick Edit Inputs */
.quick-edit-input { width: 100%; padding: 4px 8px; border: 1px solid transparent; background: transparent; border-radius: 4px; transition: border 0.2s, background 0.2s, box-shadow 0.2s; font-family: inherit; font-size: 0.95rem; }
.quick-edit-input:hover { border: 1px solid #ccc; background: #fff; }
.quick-edit-input:focus { border: 1px solid var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 2px rgba(23,124,65,0.2); }

