/* ===== AUTHENTICATION STYLES - Consistent with Your Theme ===== */

/* Auth Page Layout */
body.auth-page {
    font-family: Georgia, serif;
    background-color: #f5f3f0;
    margin: 0;
    padding-top: 70px; /* Account for navbar */
    color: #333;
    min-height: 100vh;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.auth-header h1 {
    color: #5a4a3a;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: none;
}

.auth-header p {
    color: #7a6a5a;
    font-size: 1.1rem;
    margin: 0;
}

/* Auth Form Container */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 2px solid #e8e3dc;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-body {
    padding: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #5a4a3a;
    font-family: Georgia, serif;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e3dc;
    border-radius: 8px;
    font-size: 16px;
    font-family: Georgia, serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #8b7355;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-control.is-invalid {
    border-color: #dc2626;
}

/* Form Validation */
.invalid-feedback {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-help {
    font-size: 0.875rem;
    color: #7a6a5a;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Checkboxes */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: auto;
    margin: 0;
    transform: scale(1.1);
}

.form-check-label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    background-color: #8b7355;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #6d5a44;
    text-decoration: none;
    color: white;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #8b7355;
    color: #8b7355;
}

.btn-outline:hover {
    background: #8b7355;
    color: white;
}

.btn-secondary {
    background-color: #7a6a5a;
}

.btn-secondary:hover {
    background-color: #5a4a3a;
}

.btn-danger {
    background-color: #dc3545;
}

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

.w-100 {
    width: 100%;
}

/* Layout Utilities */

.container-narrow {
    max-width: 600px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #7a6a5a;
}

.text-decoration-none {
    text-decoration: none;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.d-block {
    display: block;
}

/* Spacing */
.mb-md {
    margin-bottom: 1rem;
}

.mb-lg {
    margin-bottom: 2rem;
}

.mb-xl {
    margin-bottom: 3rem;
}

.mt-lg {
    margin-top: 2rem;
}

/* Messages and Alerts */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid;
}

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

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.auth-footer small {
    color: #7a6a5a;
}

/* Profile Specific Styles */
.profile-header {
    border-bottom: 2px solid #e8e3dc;
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.profile-info {
    margin: 20px 0;
}

.info-item {
    padding: 10px 0;
    border-bottom: 1px solid #e8e3dc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item:last-child {
    border-bottom: none;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #8b7355;
    background-color: #f8f6f3;
    border: 2px solid #e8e3dc;
}

/* Session Management */
.security-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e3dc;
}

.security-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.security-section h4 {
    color: #5a4a3a;
    margin-bottom: 15px;
}

.session-item,
.login-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e8e3dc;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f6f3;
}

.session-item:last-child,
.login-item:last-child {
    margin-bottom: 0;
}

.session-info,
.login-info {
    flex: 1;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.gap-lg {
    gap: 20px;
}

/* Card Layout */
.card {
    background: white;
    border: 2px solid #e8e3dc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.card h3 {
    color: #5a4a3a;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 0 15px;
    }
    
    .auth-form {
        margin: 0 10px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .session-item,
    .login-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .session-info,
    .login-info {
        width: 100%;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}