/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



/* DEBUG */
.edit-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 2px solid #e9ecef;
    display: block !important; /* Force display */
    opacity: 1 !important; /* Force visibility */
}
/* END DEBUG */

/* Login Container */
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: calc(100vh - 120px);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: #282828;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

/* Login Form */
.login-form {
    background: #fafafa;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #282828;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #f7876b;
    box-shadow: 0 0 0 2px rgba(247, 135, 107, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #f7876b;
    color: white;
}

.btn-primary:hover {
    background-color: #e5765a;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #363;
}

/* Links */
.link {
    color: #ff1452;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Resend Form */
.resend-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Login Footer */
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: #666;
    font-size: 0.9rem;
}

/* Main Footer */
.main-footer {
    background-color: #282828;
    color: #eeeeee;
    padding: 2rem 1rem;
    text-align: center;
    padding-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    font-size: .6em;
    color: #eee;
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #eeeeee;
    text-align: center;
}

.footer-content p:last-child {
    margin-bottom: 0;
    color: #eeeeee;
    text-align: center;
}

        .footer-links {
            text-align: center;
            margin-top: 20px;
            font-size: 13px;
        }
        .footer-links a {
            color: #ff1452;
            text-decoration: none;
            margin: 0 10px;
        }
        .footer-links a:hover {
            text-decoration: underline;
        }
        
        .footer-links {
            margin-top: 15px;
            font-size: 13px;
        }        

/* Sidebar Styles */
.main-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: #eee;
    color: #282828;
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
}

.main-sidebar.mobile-open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.sidebar-header h3 {
    margin: 0;
    color: #282828;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #282828;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(0,0,0,0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background: #e9ecef;
    color: #282828;
    border-left-color: #f7876b;
}

.nav-link.active {
    background: #e9ecef;
    color: #282828;
    border-left-color: #f7876b;
    font-weight: 600;
}

.nav-link i {
    width: 20px;
    margin-right: 1rem;
    font-size: 1.1rem;
    color: #f7876b;
}

.nav-text {
    font-weight: 500;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    font-size: 2.5rem;
    color: #f7876b;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #282828;
}

.user-level {
    font-size: 0.8rem;
    color: #666;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.visible {
    display: block;
}

/* Adjust main content for sidebar */
.dashboard-main {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.main-sidebar:not(.collapsed) ~ .dashboard-main {
    margin-left: 280px;
}

/* Menu toggle button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: #f7876b;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #ff1452;
    transform: scale(1.05);
}

/* Desktop behavior - sidebar starts collapsed */
@media (min-width: 769px) {
    .main-sidebar {
        transform: translateX(-100%);
    }
    
    .main-sidebar.collapsed {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-sidebar.collapsed ~ .dashboard-main {
        margin-left: 280px;
    }
    
    .main-sidebar.collapsed ~ .menu-toggle {
        left: 295px;
    }
    
    .main-sidebar.collapsed .sidebar-toggle i {
        transform: rotate(0deg);
    }
    
    .main-sidebar:not(.collapsed) .sidebar-toggle i {
        transform: rotate(180deg);
    }
}

/* Mobile behavior */
@media (max-width: 768px) {
    .main-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .main-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
    }
    
    .sidebar-overlay.visible {
        display: block;
    }
    
    .menu-toggle {
        display: block;
    }
}

/* Update the header to account for sidebar */
.dashboard-header {
    background: #fafafa;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 998;
}

@media (min-width: 769px) {
    .main-sidebar.collapsed ~ .dashboard-header {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-logo {
        max-width: 150px;
    }
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* OTP Input Specific */
input[inputmode="numeric"] {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.5em;
    font-weight: 600;
}

/* Favicon related styles (if needed for any favicon display elements) */
.favicon-display {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

/* Additional favicon sizes for different use cases */
.favicon-small {
    width: 16px;
    height: 16px;
}

.favicon-medium {
    width: 32px;
    height: 32px;
}

.favicon-large {
    width: 64px;
    height: 64px;
}

/* Font Awesome utility classes */
.fa-icon {
    margin-right: 0.5rem;
}

.fa-icon-left {
    margin-right: 0.5rem;
}

.fa-icon-right {
    margin-left: 0.5rem;
}

/* Loading spinner */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Back to Top Button Styles */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #d32f2f; /* Red color */
    color: white;
    border: none;
    border-radius: 5px; /* Slightly rounded square */
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background-color: #b71c1c; /* Darker red on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.back-to-top-btn:active {
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}