/* Form Overlay */
.form-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f8f9fa;
    font-weight: bold;
}

/* Pagination */
.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination a {
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #007bff;
}

.pagination a.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}




/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: #666;
    margin: 0;
}

.btn-login {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 20px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* Header Styles */
.main-header {
    background: #2c3e50;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    margin: 0;
    font-size: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome {
    color: #ecf0f1;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 3px;
}

.main-nav {
    background: #34495e;
    padding: 10px 20px;
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
}

.main-nav a:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.main-footer {
    background: #ecf0f1;
    padding: 15px 20px;
    text-align: center;
    color: #7f8c8d;
    margin-top: auto;
}


/* ===== FORM SYSTEM STYLES ===== */

/* Form Containers */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    border: 1px solid #eaeaea;
}

.form-container h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Form Groups - The building blocks */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group .help-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
    font-style: italic;
}

/* Standard Input Styles */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f8f9fa;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #b4b4b4;
}

.form-input::placeholder {
    color: #a0a0a0;
    opacity: 1;
}

.form-input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Input States */
.form-input.error {
    border-color: #e74c3c;
    background: #fee;
}

.form-input.success {
    border-color: #27ae60;
    background: #efe;
}

.form-input.warning {
    border-color: #f39c12;
    background: #fef5e7;
}

/* Specific Input Types */
.form-input[type="number"] {
    padding-right: 10px;
}

.form-input[type="date"],
.form-input[type="time"],
.form-input[type="datetime-local"] {
    padding: 13px 16px;
}

.form-input[type="color"] {
    height: 50px;
    padding: 5px;
}

.form-input[type="range"] {
    padding: 0;
    height: 6px;
    background: #ddd;
}

/* Textarea */
.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* Select Dropdowns */
.form-select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23667eea"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 45px;
}

/* Checkboxes and Radios */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #667eea;
    cursor: pointer;
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.form-check-group {
    margin-bottom: 20px;
}

.form-check-group legend {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* File Input */
.form-file {
    padding: 12px;
    border: 2px dashed #ddd;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
}

.form-file:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.form-actions.center {
    justify-content: center;
}

.form-actions.left {
    justify-content: flex-start;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Layouts */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-col {
        margin-bottom: 20px;
    }
}

/* Form Validation Messages */
.form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-success {
    color: #27ae60;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Required field indicator */
.form-group.required label::after {
    content: '*';
    color: #e74c3c;
    margin-left: 4px;
}

/* ===== SPECIFIC FORM COMPONENTS ===== */

/* Search Forms */
.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.search-form .form-input {
    flex: 1;
    min-width: 200px;
}

/* Filter Forms */
.filter-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #eaeaea;
}

.filter-form .form-row {
    margin-bottom: 15px;
}

/* Inline Forms */
.form-inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.form-inline .form-group {
    margin-bottom: 0;
    flex: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .form-input {
        padding: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .search-form {
        flex-direction: column;
    }
}

/* ===== ANIMATIONS ===== */
.form-container {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input.error {
    animation: shake 0.3s ease;
}