* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* === LOGIN PAGE === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #6c757d;
    font-size: 14px;
    font-weight: 400;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.menu-button {
    background: white;
    border: 1px solid #d1d5db;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    color: #4f46e5;
    transition: all 0.3s ease;
}

.menu-button:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: #fff;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.login-button {
    width: 100%;
    background: #4f46e5;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-button:hover {
    background: #4338ca;
}

/* === MAIN APPLICATION === */
.app-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.app-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.app-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-button {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.nav-button.active {
    background: #4f46e5;
    color: white;
}

.logout-button {
    background: #dc2626;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.logout-button:hover {
    background: #b91c1c;
}

.app-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* === SEARCH SECTION === */
.search-section {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-button, .clear-button {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: #4338ca;
}

.clear-button {
    background: #6b7280;
}

.clear-button:hover {
    background: #4b5563;
}

/* === RESULTS SECTION === */
.results-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.results-header {
    background: #f9fafb;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.results-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.results-content {
    padding: 20px;
}

.result-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafbfc;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-name {
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 16px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #4f46e5;
}

.detail-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.result-description {
    margin-top: 16px;
    padding: 16px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #4f46e5;
}

.result-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.action-btn.edit {
    background: #0ea5e9;
    color: white;
}

.action-btn.edit:hover {
    background: #0284c7;
}

.action-btn.delete {
    background: #ef4444;
    color: white;
}

.action-btn.delete:hover {
    background: #dc2626;
}

/* === FORM SECTION === */
.form-section {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.button-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-secondary:hover {
    background: #4b5563;
}

/* === ADMIN PANEL === */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    overflow-x: auto;
}

.admin-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    white-space: nowrap;
}

.admin-tab.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-tab-content {
    display: block;
}

.admin-tab-content.hidden {
    display: none;
}

/* === TABLE === */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th {
    background: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f9fafb;
}

/* === ALERTS === */
.alert {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

/* === EDIT MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    color: #374151;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .app-header {
        padding: 0 16px;
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .app-nav {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-content {
        padding: 16px;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions button {
        flex: 1;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tab {
        flex: none;
    }

    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 20px;
    }

    .login-card {
        padding: 30px 20px;
        margin: 20px;
    }

    .email-icon {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .result-actions {
        justify-content: center;
    }

    .table-container {
        margin: 0 -16px;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 16px;
    }

    .nav-button, .logout-button {
        font-size: 12px;
        padding: 6px 10px;
    }

    .search-title {
        font-size: 16px;
    }

    .result-name {
        font-size: 16px;
    }

    .login-header h1 {
        font-size: 20px;
    }
}

/* === UTILITY CLASSES === */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6b7280;
}

.mb-4 {
    margin-bottom: 16px;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
}

.password-toggle:hover {
    color: #374151;
}