/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a67d8;
}

/* Layout Components */
.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 100px; /* Increased */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 100px; /* Increased */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    display: flex; /* Added */
    align-items: center; /* Added */
}

/* --- START: New Logo Styles --- */
.nav-logo .logo-desktop {
    height: 80px; /* Increased */
    width: auto;
    display: block;
}
.nav-logo .logo-mobile {
    height: 60px; /* Increased */
    width: auto;
    display: none;
}
/* --- END: New Logo Styles --- */


.logo-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.nav-cta {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.nav-dropdown-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #4a5568;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.nav-dropdown-content a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #4a5568;
    border-radius: 2px;
    transition: 0.3s;
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 110px; /* Adjusted */
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

.flash-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.flash-error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.flash-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 101, 101, 0.3);
    color: white;
}

.btn-google {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-google:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #718096;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.forgot-password-link {
    font-size: 0.875rem;
    color: #667eea;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #718096;
    margin-bottom: 0;
}

.auth-form {
    margin-bottom: 2rem;
}

.auth-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: #718096;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
}

.auth-footer {
    text-align: center;
    color: #718096;
}

.auth-footer a {
    color: #667eea;
    font-weight: 500;
}

/* Error and Success Messages */
.error-messages, .success-message {
    margin-bottom: 1.5rem;
}

.error-message {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #c53030;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.success-message {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #2f855a;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.success-message h2 {
    color: #2f855a;
    margin-bottom: 1rem;
}

/* Dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dashboard-welcome h1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.dashboard-welcome p {
    color: #718096;
    margin-bottom: 0;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.analytics-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-5px);
}

.analytics-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.analytics-icon svg {
    width: 24px;
    height: 24px;
}

.analytics-content h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: #2d3748;
}

.analytics-content p {
    color: #718096;
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Links Section */
.links-section {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin-bottom: 0;
    color: #2d3748;
}

.search-container {
    max-width: 300px;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.search-btn {
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

.search-btn svg {
    width: 16px;
    height: 16px;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.link-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.link-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.link-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    color: #2d3748;
}

.link-actions {
    display: flex;
    gap: 0.5rem;
}

.link-action {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #718096;
}

.link-action:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.link-action.delete:hover {
    background: rgba(245, 101, 101, 0.1);
    color: #f56565;
}

.link-action svg {
    width: 16px;
    height: 16px;
}

.link-url {
    margin-bottom: 1rem;
}

.link-url a {
    color: #667eea;
    font-size: 0.875rem;
}

.link-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-weight: 600;
    color: #2d3748;
}

.stat-label {
    font-size: 0.75rem;
    color: #718096;
}

.link-public-url {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.public-url-input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.75rem;
    color: #718096;
}

.copy-btn {
    padding: 0.25rem;
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* Form Pages */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.form-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    color: #718096;
    margin-bottom: 0;
}

.form-preview {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-preview h3 {
    margin-bottom: 1rem;
    color: #4a5568;
}

.preview-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.preview-keyword {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.preview-url {
    color: #667eea;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.preview-public-url {
    font-size: 0.75rem;
    color: #718096;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.link-stats {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-item .stat-label {
    font-size: 0.875rem;
    color: #718096;
}

/* Profile Page */
.profile-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem; 
}

@media (max-width: 480px) {
    .profile-container {
        padding-top: 0.5rem !important; /* Force smaller padding on mobile */
    }
}


.profile-header {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
    margin-bottom: 1.5rem;
}

.profile-avatar img, .avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
}

.avatar-placeholder {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.profile-name {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.profile-username {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.profile-description {
    color: #718096;
    margin-bottom: 1.5rem;
}

.profile-branding {
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.brand-link {
    display: inline-block;
    text-decoration: none;
}

.brand-text {
    display: block;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25rem;
}

.brand-tagline {
    display: block;
    color: #718096;
    font-size: 0.75rem;
}

.search-section {
    margin-bottom: 2rem;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: #718096;
    z-index: 1;
}

.search-section .search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    font-size: 1rem;
    background: white;
}

.search-clear {
    position: absolute;
    right: 1rem;
    color: #718096;
    padding: 0.25rem;
}

.search-clear svg {
    width: 16px;
    height: 16px;
}

.search-section .search-btn {
    margin-left: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-section .search-btn:hover {
    transform: translateY(-2px);
}

.links-section {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.link-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.link-item .link-avatar img, .link-item .avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.link-item .avatar-placeholder {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.link-content {
    flex: 1;
}

.link-item .link-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.link-date {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0;
}

.link-arrow {
    color: #cbd5e0;
    transition: all 0.3s ease;
}

.link-item:hover .link-arrow {
    color: #667eea;
    transform: translateX(5px);
}

.link-arrow svg {
    width: 20px;
    height: 20px;
}

.profile-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.profile-footer a {
    color: white;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-subtitle {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.footer-description {
    color: #a0aec0;
    margin-bottom: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #a0aec0;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #a0aec0;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* --- START: Nav Logo Mobile Styles --- */
    .nav-logo .logo-desktop {
        display: none;
    }
    .nav-logo .logo-mobile {
        display: block;
    }
    /* --- END: Nav Logo Mobile Styles --- */

    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .dashboard-actions {
        justify-content: center;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .search-section .search-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-section .search-btn {
        margin-left: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-card, .form-card {
        padding: 2rem 1.5rem;
    }
    
    .profile-header {
        padding: 2rem 1.5rem;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-card {
        flex-direction: column;
        text-align: center;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .dashboard-container, .form-container, .profile-container {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.link-card, .analytics-card, .auth-card, .form-card {
    animation: fadeIn 0.6s ease forwards;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }
/* Removed extra closing brace */

/* --- MODERN SIDEBAR LAYOUT FIXED --- */

/* 1. RESET Global Layout Styles for Dashboard */
body.dashboard-page {
    padding-top: 0 !important;
    background-color: #f7fafc;
}

/* CRITICAL FIX: Reset the container from header.php */
body.dashboard-page .main-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    min-height: 100vh;
}

/* 2. Layout Wrapper */
.app-layout {
    display: flex; /* Flexbox to hold sidebar and content */
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* 3. Sidebar Styling */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed; /* Fixed stays on screen */
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f2f5;
}

.sidebar-logo { height: 40px; width: auto; }

/* Navigation Items */
.nav-label {
    font-size: 0.7rem; font-weight: 700; color: #a0aec0;
    margin: 1.5rem 0 0.75rem; letter-spacing: 0.05em;
}
.nav-label:first-child { margin-top: 0; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; color: #4a5568;
    text-decoration: none; border-radius: 12px;
    margin-bottom: 5px; font-weight: 500;
    transition: all 0.2s ease; border: none; background: none;
    width: 100%; cursor: pointer; text-align: left; font-size: 0.95rem;
}
.nav-item:hover { background: #f7fafc; color: #667eea; transform: translateX(4px); }
.nav-item.active { background: linear-gradient(135deg, #667eea, #764ba2); color: white; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); }
.nav-item i { width: 20px; text-align: center; }

/* Sidebar Footer */
.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid #f0f2f5; }
.user-mini-profile { display: flex; align-items: center; gap: 10px; }
.user-avatar-circle {
    width: 36px; height: 36px; background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-weight: bold; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; overflow: hidden; }
.u-name { font-weight: 600; font-size: 0.9rem; color: #2d3748; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-logout { font-size: 0.8rem; color: #718096; }

/* 4. Main Content Wrapper (The Fix for 'Behind Sidebar') */
.main-content-wrapper {
    margin-left: 260px !important; /* Force margin to push content right */
    width: calc(100% - 260px);
    padding: 2rem;
    flex: 1;
    background-color: #f7fafc;
}

/* Dashboard Topbar */
.dashboard-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.welcome-text h1 { font-size: 1.75rem; margin-bottom: 0.25rem; color: #1a202c; }

/* Mobile Header & Responsive */
.mobile-dash-header {
    display: none; background: white; padding: 1rem;
    justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 2000; border-bottom: 1px solid #e2e8f0; height: 60px;
}
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 1.2rem; }
.logo-area img { height: 32px; width: auto; }
.sidebar-toggle-btn { background: none; border: none; font-size: 1.5rem; color: #4a5568; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: 260px; top: 60px; height: calc(100vh - 60px); }
    .sidebar.open { transform: translateX(0); box-shadow: 10px 0 25px rgba(0,0,0,0.1); }
    
    .main-content-wrapper { margin-left: 0 !important; width: 100%; padding-top: 80px; }
    
    .mobile-dash-header { display: flex; }
    .dashboard-topbar { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .topbar-actions { width: 100%; }
    .topbar-actions .btn { width: 100%; justify-content: center; }
}

/* Utility */
.stat-badge { background: #ebf8ff; color: #3182ce; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.stat-date { font-size: 0.8rem; color: #a0aec0; margin-left: auto; }