/* Admin Dashboard - Forms & User Management */

/* User Management */
.user-mgmt-header {
    margin-bottom: 24px;
}

.user-mgmt-header h1 { 
    margin: 0 0 4px 0; 
    color: #333; 
    font-size: 28px; 
}

.user-mgmt-header .subtitle { 
    color: #666; 
    font-size: 15px; 
    margin: 0; 
}

.user-mgmt-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.user-mgmt-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.user-mgmt-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.user-mgmt-tab:hover { 
    color: #007bff; 
}

.user-mgmt-tab.active {
    color: #dc3545;
    font-weight: 600;
    border-bottom-color: #dc3545;
}

.user-mgmt-content-card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-mgmt-content-card h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
}

.user-mgmt-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.user-mgmt-search-wrap { 
    flex: 1; 
    min-width: 260px; 
}

.user-mgmt-search-wrap label { 
    display: block; 
    font-size: 13px; 
    color: #555; 
    margin-bottom: 4px; 
}

.user-mgmt-search-wrap input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.user-mgmt-filter-wrap { 
    min-width: 140px; 
}

.user-mgmt-filter-wrap label { 
    display: block; 
    font-size: 13px; 
    color: #555; 
    margin-bottom: 4px; 
}

.user-mgmt-filter-wrap select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.user-mgmt-count {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.user-mgmt-info-banner {
    background: #cce5ff;
    color: #004085;
    padding: 16px 20px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    font-size: 14px;
}

.user-mgmt-tab-panel { 
    display: none; 
}

.user-mgmt-tab-panel.active { 
    display: block; 
}

/* Add User Form */
.add-user-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin-bottom: 24px;
}

.add-user-field { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.add-user-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.add-user-field label .required { 
    color: #dc3545; 
}

.add-user-field input,
.add-user-field select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.add-user-field input:focus,
.add-user-field select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.add-user-field.full-width { 
    grid-column: 1 / -1; 
}

.add-user-field-wrap { 
    position: relative; 
}

.add-user-field-wrap input { 
    padding-right: 40px; 
}

.add-user-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    font-size: 18px;
}

.add-user-password-toggle:hover { 
    color: #333; 
}

.add-user-label-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.add-user-label-help .help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    font-size: 12px;
    cursor: help;
}

.add-user-submit-btn {
    width: 100%;
    max-width: 320px;
    padding: 12px 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-user-submit-btn:hover { 
    background: #c82333; 
}

/* Activity Log Filters */
.activity-log-heading { 
    margin: 0 0 16px 0; 
    color: #333; 
    font-size: 18px; 
}

.activity-log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 24px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.activity-log-field { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.activity-log-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.activity-log-field input,
.activity-log-field select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    min-width: 140px;
}

.activity-log-field select#activity-type-filter {
    min-width: 200px;
}

.activity-log-info { 
    margin-bottom: 16px; 
}

.activity-log-export-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.activity-log-export-btn:hover { 
    background: #0056b3; 
}

/* Create Instance Form */
.create-instance-heading { 
    margin: 0 0 16px 0; 
    font-size: 20px; 
    font-weight: 600; 
    color: #333; 
}

.create-instance-banner {
    background: #cce5ff; 
    color: #004085; 
    padding: 16px 20px; 
    border-radius: 6px;
    border-left: 4px solid #007bff; 
    font-size: 14px; 
    margin-bottom: 24px;
}

.create-instance-form { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 24px 32px; 
    margin-bottom: 24px; 
}

.create-instance-field { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.create-instance-field label { 
    font-size: 13px; 
    font-weight: 500; 
    color: #333; 
}

.create-instance-field input[type="text"],
.create-instance-field input[type="number"],
.create-instance-field textarea {
    padding: 10px 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-size: 14px; 
    font-family: inherit;
}

.create-instance-field textarea { 
    min-height: 80px; 
    resize: vertical; 
}

.create-instance-field .number-wrap { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.create-instance-field .number-wrap input { 
    width: 80px; 
    text-align: center; 
}

.create-instance-field .number-btn { 
    width: 36px; 
    height: 36px; 
    padding: 0; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    background: #f8f9fa; 
    font-size: 18px; 
    cursor: pointer; 
    line-height: 1; 
}

.create-instance-field .number-btn:hover { 
    background: #e9ecef; 
}

.create-instance-submit { 
    padding: 12px 24px; 
    background: #dc3545; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
}

.create-instance-submit:hover { 
    background: #c82333; 
}

@media (max-width: 640px) { 
    .create-instance-form { 
        grid-template-columns: 1fr; 
    } 
}

/* Instance Management Forms */
.inst-form-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 16px 24px; 
}

.inst-field { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
}

.inst-field label { 
    font-size: 13px; 
    font-weight: 500; 
    color: #333; 
}

.inst-field input[type="text"], 
.inst-field input[type="number"] { 
    padding: 8px 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-size: 14px; 
}

.inst-field input[readonly] { 
    background: #f5f5f5; 
    color: #666; 
}

.inst-field.full-width { 
    grid-column: 1 / -1; 
}

.inst-criteria-wrap { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.inst-criteria-wrap input { 
    width: 60px; 
    text-align: center; 
}

.inst-criteria-btn { 
    width: 32px; 
    height: 32px; 
    padding: 0; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    background: #f8f9fa; 
    font-size: 18px; 
    cursor: pointer; 
    line-height: 1; 
}

.inst-criteria-btn:hover { 
    background: #e9ecef; 
}

.inst-checkbox-wrap { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.inst-checkbox-wrap input { 
    width: 18px; 
    height: 18px; 
}

@media (max-width: 600px) { 
    .inst-form-grid { 
        grid-template-columns: 1fr; 
    } 
}
