/* ============================================================
   Base / Reset
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    padding: 0;
    position: relative;
}

/* Left section */
.navbar-left {
    display: flex;
    align-items: center;
}

/* Center section */
.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Right section */
.navbar-right {
    display: flex;
    align-items: center;
    position: relative;
}

.navbar a {
    float: none;
    display: inline-block;
    font-size: 16px;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

.navbar .active {
    background-color: #ee661b;
    color: white;
}

/* Navbar brand (used on auth pages) */
.navbar-brand {
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    padding: 14px 20px;
    letter-spacing: 0.5px;
}

.navbar-brand:hover {
    color: #ddd;
}

/* Hamburger button */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.hamburger-btn:hover span {
    background-color: #ddd;
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #444;
    min-width: 160px;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 4px 4px;
}

.dropdown-menu a {
    display: block;
    float: none;
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
    color: rgb(80, 74, 74);

}

.dropdown-menu a:hover {
    background-color: #555;
    color: white;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-user {
    display: block;
    padding: 10px 16px 6px;
    color: #34b83f;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    border-bottom: 1px solid #555;
    margin-bottom: 4px;
}

/* ============================================================
   Page Content
   ============================================================ */
.page-content {
    padding: 20px;
}

/* ============================================================
   General Container
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

/* ============================================================
   Tables
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f5f5f5;
}

/* ============================================================
   Utility / Feedback
   ============================================================ */
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.refresh-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

.refresh-btn:hover {
    background-color: #0056b3;
}

.refresh-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.count-info {
    margin-bottom: 10px;
    color: #666;
}

/* ============================================================
   Auth Layout
   ============================================================ */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 16px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    padding: 36px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    margin: 0 0 24px;
    font-size: 1.5rem;
    color: #222;
    text-align: center;
}

/* ============================================================
   Auth Forms
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #ee661b;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

.help-text {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

.field-errors {
    list-style: none;
    padding: 0;
    margin: 5px 0 0;
    color: #c0392b;
    font-size: 13px;
}

/* Messages / alerts */
.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.messages .message {
    padding: 10px 14px;
    border-radius: 4px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    margin-bottom: 8px;
    font-size: 14px;
}

.messages .message.error,
.messages .message.danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.messages .message.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Non-field errors */
.non-field-errors {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.non-field-errors li {
    padding: 10px 14px;
    border-radius: 4px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    margin-bottom: 6px;
}

/* Submit button */
.btn-submit {
    display: block;
    width: 100%;
    padding: 11px;
    background-color: #ee661b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #ee661b;
}

/* Footer link */
.auth-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: #ee661b;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* ============================================================
   Brand Buttons
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background-color: #ee661b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #d45a17;
    box-shadow: 0 2px 8px rgba(238, 102, 27, 0.35);
    color: #fff;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #b02a37;
    color: #fff;
}

/* ============================================================
   Profile Page
   ============================================================ */
.profile-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

.profile-title {
    font-size: 1.8rem;
    color: #222;
    text-align: center;
    margin-bottom: 28px;
}

/* Alert messages on profile page */
.profile-messages {
    margin-bottom: 20px;
}

.profile-messages .alert {
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 8px;
}

.profile-messages .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.profile-messages .alert-error,
.profile-messages .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Profile section cards */
.profile-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #333;
    color: #fff;
    padding: 14px 20px;
}

.profile-card-header i {
    font-size: 1.2rem;
    color: #ee661b;
}

.profile-card-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
}

.profile-card-body {
    padding: 22px 24px;
}

/* Danger zone card variant */
.profile-card--danger .profile-card-header {
    background-color: #7b1a1a;
}

.profile-card--danger .profile-card-header i {
    color: #ff8080;
}

.danger-text {
    color: #555;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

/* Form layout: responsive row of columns */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 4px;
}

.form-col {
    flex: 1 1 180px;
    min-width: 0;
}

.form-col--wide {
    flex: 2 1 260px;
}

/* Profile form inputs / selects */
.profile-card-body .form-group input,
.profile-card-body .form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-card-body .form-group input:focus,
.profile-card-body .form-group select:focus {
    outline: none;
    border-color: #ee661b;
    box-shadow: 0 0 0 2px rgba(238, 102, 27, 0.18);
}

/* Optional / required tags */
.optional-tag {
    font-size: 11px;
    font-weight: 400;
    color: #999;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.required-tag {
    font-size: 11px;
    font-weight: 600;
    color: #ee661b;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Section hint text */
.section-hint {
    color: #666;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Profile image section */
.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.profile-img-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ee661b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #e9ecef;
    border: 2px dashed #adb5bd;
    color: #adb5bd;
    font-size: 13px;
    text-align: center;
    gap: 4px;
}

.no-image-placeholder i {
    font-size: 2.5rem;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 11px;
}

.mt-3 {
    margin-top: 16px;
}

/* Save button row */
.profile-save-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }

    .profile-save-row {
        justify-content: stretch;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}
