/* Auth and dashboard specific styles */
:root {
    --bg: #f7f8fb;
    --card: #ffffff;
    --accent: #ff6b6b;
    --accent-1: #76250d;
    --accent-2: #0D5E76;
    --muted: #6b7280;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    margin: 0;
    background: var(--bg);
    color: #0b1220;
}

.form-container {
    max-width: 460px;
    margin: 28px auto;
    background: var(--card);
    padding: 22px 20px;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(11, 18, 32, 0.06);
}

.form-container label {
    display: block;
    margin-bottom: 18px;
    font-size: 14px;
    color: #222;
    position: relative;
    background: transparent;
    padding: 0;
}

.form-container input[type="password"],
.form-container input[type="text"],
.form-container input[type="email"] {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 6px;
    background: #fff;
}

.show-code-btn {
    position: absolute;
    right: 12px;
    top: calc(50% + 11px);
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    outline: none;
    padding: 0 !important;
    margin: 0 !important;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 0;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.show-code-btn:hover {
    opacity: 0.7;
    transform: translateY(-50%) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.show-code-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23555555'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.form-container input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: transparent;
}

.form-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--accent-2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600
}

.form-container button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(13, 94, 118, 0.12)
}

.form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--nav-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    position: relative;
}

.form-header a {
    text-decoration: none;
    color: #fff;
}

.form-header h2 {
    color: #fff;
}

.profile-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.profile-menu-wrapper:hover {
    background: rgba(255, 255, 255, 0.15);
}

.profile-menu-wrapper .user-name {
    color: #fff;
    font-weight: 500;
}

#profilePic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    padding: 8px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    /* This contains the hover effect */
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #0b1220;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    /* Remove any margin */
}

.menu-item:hover {
    background-color: #464646;
    color: white;
    width: 100%;
    margin: 0;
    border-radius: 0;
    /* Remove any border radius on hover */
}

.menu-icon {
    font-size: 18px;
}

.logout-item {
    border-top: 1px solid #eee;
    color: #0b1220;
    width: 100%;
    margin: 0;
}

.logout-item:hover {
    background-color: #4cae4c;
    color: white;
}

.muted {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px
}

.msg {
    color: #ef4444;
    margin-top: 8px;
    font-size: 13px
}

.dashboard {
    max-width: 860px;
    margin: 28px auto;
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(11, 18, 32, 0.05)
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info img#profilePic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.user-name {
    color: #0b1220;
    /* darker text by default; on white cards this will be dark */
    font-weight: 600;
}

.logout {
    padding: 6px 10px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* small reveal animation for forms */
.form-container {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp .6s ease .05s forwards
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* Dashboard search (placed under the dashboard card)
   centered with max-width similar to the card */
.dashboard-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 14px auto 0;
    max-width: 900px;
    padding: 6px
}

.dashboard-search input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    font-size: 14px
}

.dashboard-search button {
    background: var(--accent-2);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px
}

.search-results {
    margin: 18px auto 0;
    background: var(--card);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    min-height: 48px;
    color: #111;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(11, 18, 32, 0.04)
}

/* Dropdown Menu Styles */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    color: white;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-menu {
    padding: 8px 0;
    background: #000000;
    border-radius: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #0b1220;
    /* Dark text color by default */
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
}

.menu-item:hover {
    background-color: #464646;
    color: white;

}

/* Special styling for logout item remains the same */
.logout-item {
    border-top: 1px solid #eee;
    color: #ffffff;
}

.logout-item:hover {
    background-color: #4cae4c;
    color: white;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

/* Google Sign-In Button Styles */
.google-signin-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--accent-1);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.google-signin-btn:hover {
    background-color: #5a3415;
    box-shadow: 0 2px 8px rgba(118, 37, 13, 0.3);
}

.google-signin-btn:active {
    background-color: #4a1f0a;
}

.google-signin-btn:disabled {
    background-color: var(--accent-1);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    opacity: 0.7;
}

.google-signin-btn span {
    letter-spacing: 0.25px;
}

.google-logo {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    color: #4285f4;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* Dashboard Tabs and Features */
.dashboard-tabs {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    border-bottom: 2px solid #e6e9ee;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--accent);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-icon {
    font-size: 18px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.section-desc {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tool-card {
    background: #f9fafb;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.tool-card:hover {
    box-shadow: 0 4px 12px rgba(11, 18, 32, 0.08);
    border-color: var(--accent);
}

.tool-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.tool-card h5 {
    margin: 8px 0;
    font-size: 16px;
    color: #0b1220;
}

.tool-card p {
    color: var(--muted);
    font-size: 13px;
    margin: 8px 0;
}

.tool-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.btn-small {
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
}

.btn-small:hover {
    background: #ff5555;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.app-card {
    background: #f9fafb;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.app-card:hover {
    box-shadow: 0 4px 12px rgba(11, 18, 32, 0.08);
}

.app-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.app-card h5 {
    margin: 8px 0;
    font-size: 16px;
}

.app-card p {
    color: var(--muted);
    font-size: 13px;
    margin: 8px 0;
}

.app-status {
    margin-top: 12px;
}

.status-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.resource-card {
    background: #f9fafb;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.resource-card:hover {
    box-shadow: 0 4px 12px rgba(11, 18, 32, 0.08);
    border-color: var(--accent);
}

.resource-card h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.resource-type {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 4px 0;
}

.resource-desc {
    color: var(--muted);
    font-size: 14px;
    margin: 8px 0;
}

.resource-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.resource-link:hover {
    color: #ff5555;
}

/* Cloud Storage */
.storage-info {
    background: #f9fafb;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: #e6e9ee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.storage-used {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.storage-text {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.files-list {
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #f0f1f3;
}

.file-icon {
    font-size: 24px;
}

.file-info {
    flex: 1;
}

.file-name {
    margin: 0;
    font-weight: 600;
    color: #0b1220;
}

.file-meta {
    margin: 4px 0 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* Add Button */
.btn-add {
    padding: 10px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.btn-add:hover {
    background: #ff5555;
    transform: translateY(-2px);
}

/* Error Message Styles */
.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-message::before {
    content: "⚠️";
    font-size: 18px;
    flex-shrink: 0;
}

body.dark-mode .error-message {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fecaca;
}

/* Success Message Styles */
.success-message {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-message::before {
    content: "✓";
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

body.dark-mode .success-message {
    background: #15803d;
    border-color: #22c55e;
    color: #86efac;
}

/* Upload Loading State */
.upload-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: var(--accent-2);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Drop Zone with Upload States */
.drop-zone.uploading {
    border-color: var(--accent-2);
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.15) 0%, rgba(13, 94, 118, 0.1) 100%);
}

.drop-zone.upload-error {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.drop-zone.upload-success {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

body.dark-mode .drop-zone.uploading {
    border-color: #4da6b8;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.25) 0%, rgba(13, 94, 118, 0.15) 100%);
}

body.dark-mode .drop-zone.upload-error {
    border-color: #f87171;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
}

body.dark-mode .drop-zone.upload-success {
    border-color: #34d399;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
}

/* File Upload Progress */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin: 16px 0;
}

.upload-progress-bar {
    height: 100%;
    background: var(--accent-2);
    transition: width 0.3s ease;
    border-radius: 2px;
}

body.dark-mode .upload-progress {
    background: #444;
}

/* Modal Loading Overlay */
.modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 100;
}

body.dark-mode .modal-loading {
    background: rgba(0, 0, 0, 0.9);
}

.modal-loading .loading-spinner {
    width: 24px;
    height: 24px;
    margin: 0;
}

/* Dark Mode Styles for Auth Pages */
body.dark-mode {
    --bg: #1a1a1a;
    --card: #2d2d2d;
    --muted: #b0b0b0;
}

body.dark-mode .form-container {
    background: var(--card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode .form-container label {
    color: #e0e0e0;
    background: transparent;
    padding: 0;
}

body.dark-mode .form-container input[type="password"],
body.dark-mode .form-container input[type="text"],
body.dark-mode .form-container input[type="email"],
body.dark-mode .form-container input {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .form-container input::placeholder {
    color: #999;
}

body.dark-mode .form-header {
    background: #0a0a0a;
}

body.dark-mode .dashboard {
    background: var(--card);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dashboard h2,
body.dark-mode .dashboard h3,
body.dark-mode .dashboard h4 {
    color: #e0e0e0;
}

body.dark-mode .dashboard p {
    color: #b0b0b0;
}

body.dark-mode .tab-btn {
    color: #e0e0e0;
    border-bottom-color: #444;
}

body.dark-mode .tab-btn.active {
    border-bottom-color: var(--accent-2);
}

body.dark-mode .search-results {
    background: var(--card);
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .muted {
    color: var(--muted);
}

/* Profile Page Styles */
.profile-container {
    max-width: 600px;
    margin: 28px auto;
    padding: 0 20px;
}

.profile-card {
    background: var(--card);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(11, 18, 32, 0.06);
}

.profile-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.profile-header-section h3 {
    margin: 0;
    font-size: 24px;
    color: #0b1220;
}

.btn-edit {
    padding: 10px 16px;
    background: var(--accent-2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 94, 118, 0.2);
}

.profile-pic-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.profile-pic-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-2);
    margin-bottom: 20px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #e6e9ee;
    color: #0b1220;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #d0d4dd;
    transform: translateY(-2px);
}

.btn-primary {
    padding: 12px 24px;
    background: var(--accent-2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(13, 94, 118, 0.12);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    background: #fff;
}

.form-group input:read-only {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.form-group input.editable {
    background: #fff;
    color: #0b1220;
    cursor: text;
    border-color: var(--accent-2);
}

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    padding: 10px 35px 10px 12px;
}

.password-field .show-code-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.button-group .btn-primary,
.button-group .btn-secondary {
    margin: 0;
    flex: 1;
}

.msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

/* Dark Mode Profile Styles */
body.dark-mode .profile-card {
    background: var(--card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode .profile-header-section h3 {
    color: #e0e0e0;
}

body.dark-mode .profile-pic-large {
    border-color: var(--accent-2);
}

body.dark-mode .btn-edit {
    background: var(--accent-2);
}

body.dark-mode .btn-edit:hover {
    box-shadow: 0 4px 12px rgba(13, 94, 118, 0.3);
}

body.dark-mode .btn-secondary {
    background: #444;
    color: #e0e0e0;
}

body.dark-mode .btn-secondary:hover {
    background: #555;
}

body.dark-mode .form-group label {
    color: #e0e0e0;
}

body.dark-mode .form-group input {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .form-group input:read-only {
    background: #2a2a2a;
    color: #999;
}

body.dark-mode .form-group input.editable {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: var(--accent-2);
}

/* OTP Page Styles */
.otp-section {
    text-align: center;
    padding: 20px 0;
}

.otp-message {
    font-size: 16px;
    color: #222;
    margin-bottom: 8px;
    font-weight: 500;
}

.otp-email {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 32px;
}

.otp-input {
    width: 50px;
    height: 50px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    background: #fff;
    color: #0b1220;
    transition: all 0.2s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(13, 94, 118, 0.1);
}

.otp-input:read-only {
    background: #f5f5f5;
}

.otp-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-2);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
}

.otp-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(13, 94, 118, 0.12);
}

.otp-resend {
    margin-top: 24px;
    text-align: center;
}

.otp-resend p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--muted);
}

.resend-link {
    background: none;
    border: none;
    color: var(--accent-2);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
    font-size: 14px;
    padding: 0;
}

.resend-link:hover {
    opacity: 0.8;
}

.resend-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.resend-timer {
    color: var(--accent-2);
    font-weight: 500;
    font-size: 12px;
}

/* Dark Mode OTP Styles */
body.dark-mode .otp-message {
    color: #e0e0e0;
}

body.dark-mode .otp-email {
    color: #b0b0b0;
}

body.dark-mode .otp-input {
    background: #3a3a3a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .otp-input:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(13, 94, 118, 0.2);
}

body.dark-mode .otp-input:read-only {
    background: #2a2a2a;
}

body.dark-mode .otp-resend p {
    color: #b0b0b0;
}

/* Tools Page Styles */
.tools-container {
    max-width: 900px;
    margin: 28px auto;
    padding: 0 20px;
}

.tools-card {
    background: var(--card);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(11, 18, 32, 0.06);
}

.tools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.tools-header h3 {
    margin: 0;
    font-size: 24px;
    color: #0b1220;
}

.tools-categories {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #0b1220;
    transition: all 0.2s ease;
}

.category-btn:hover {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.category-btn.active {
    background: var(--accent-2);
    color: #fff;
    border-color: var(--accent-2);
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.tool-item:hover {
    box-shadow: 0 4px 12px rgba(11, 18, 32, 0.08);
    border-color: var(--accent);
}

.tool-info {
    flex: 1;
}

.tool-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #0b1220;
}

.tool-category {
    font-size: 13px;
    color: #5f6368;
    margin: 6px 0;
}

.tool-desc {
    font-size: 14px;
    color: #5f6368;
    margin: 8px 0;
    line-height: 1.5;
}

.tool-meta {
    font-size: 12px;
    color: #9aa0a6;
    margin: 6px 0;
}

.tool-link a {
    color: var(--accent-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.tool-link a:hover {
    text-decoration: underline;
}

.tool-status {
    margin: 8px 0 0 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.archived {
    background: #e2e3e5;
    color: #383d41;
}

.tool-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.btn-edit,
.btn-delete {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-edit {
    background: var(--accent-2);
    color: #fff;
}

.btn-edit:hover {
    box-shadow: 0 4px 12px rgba(13, 94, 118, 0.3);
}

.btn-delete {
    background: #f5f5f5;
    color: #ef4444;
    border: 1px solid #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368;
    font-size: 16px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #0b1220;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #5f6368;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #0b1220;
}

.tool-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #0b1220;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(13, 94, 118, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

/* Dark Mode Tools Styles */
body.dark-mode .tools-header h3 {
    color: #e0e0e0;
}

body.dark-mode .category-btn {
    background: #333;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .category-btn:hover {
    border-color: var(--accent-2);
}

body.dark-mode .category-btn.active {
    background: var(--accent-2);
    color: #fff;
    border-color: var(--accent-2);
}

body.dark-mode .tool-item {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-mode .tool-item:hover {
    border-color: var(--accent-2);
}

body.dark-mode .tool-info h4 {
    color: #e0e0e0;
}

body.dark-mode .tool-category,
body.dark-mode .tool-desc,
body.dark-mode .tool-meta {
    color: #a0a0a0;
}

body.dark-mode .modal-content {
    background: #1e1e1e;
}

body.dark-mode .modal-header {
    border-bottom-color: #444;
}

body.dark-mode .modal-header h3 {
    color: #e0e0e0;
}

body.dark-mode .modal-close {
    color: #a0a0a0;
}

body.dark-mode .modal-close:hover {
    color: #e0e0e0;
}

/* Tool ID Display Styling */
.tool-id-display {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 10px;
    background: #2a2a2a;
    color: #ffffff;
    border-radius: 4px;
    border: 1px solid #444;
    word-break: break-all;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.tool-id-display:hover {
    background: #3a3a3a;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Light Mode Tool ID */
body:not(.dark-mode) .tool-id-display {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

body:not(.dark-mode) .tool-id-display:hover {
    background: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .modal-close:hover {
    color: #e0e0e0;
}

/* Dark Mode Tool Card Styling */
body.dark-mode .tool-card {
    background: #2a2a2a;
    border: 2px solid rgba(13, 94, 118, 0.3);
    color: #e0e0e0;
    transition: all 0.3s ease;
}

body.dark-mode .tool-card:hover {
    border-color: var(--accent-2);
    box-shadow: 0 4px 12px rgba(13, 94, 118, 0.4), 0 0 15px rgba(13, 94, 118, 0.2);
}

body.dark-mode .tool-card h5 {
    color: #f3f4f6;
}

body.dark-mode .tool-card p {
    color: #a0a0a0;
}

/* Dark Mode Tools Container Styling */
body.dark-mode .tools-container {
    background: transparent;
}

body.dark-mode .tools-card {
    background: #1f2937;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(13, 94, 118, 0.3);
}

body.dark-mode .tools-header h3 {
    color: #f3f4f6;
}

body.dark-mode .tools-card:hover {
    border-color: var(--accent-2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(13, 94, 118, 0.2);
}


body.dark-mode .form-group label {
    color: #e0e0e0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: var(--accent-2);
}

body.dark-mode .form-actions {
    border-top-color: #444;
}

/* Drop Zone Styles */
.drop-zone {
    max-width: 800px;
    margin: 20px auto;
    border: 2px dashed #76250d;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(13, 94, 118, 0.05) 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(13, 94, 118, 0.1) 100%);
    transform: translateY(-2px);
}

.drop-zone.dragover {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(13, 94, 118, 0.15) 100%);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.2);
}

/* Drop Zone in Modal Styles */
.drop-zone-modal {
    border: 2px dashed #76250d;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(13, 94, 118, 0.05) 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.drop-zone-modal:hover {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(13, 94, 118, 0.1) 100%);
}

.drop-zone-modal.dragover {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(13, 94, 118, 0.15) 100%);
    box-shadow: inset 0 0 16px rgba(255, 107, 107, 0.1);
}

.drop-zone-content {
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.drop-zone h3 {
    margin: 0 0 8px;
    color: #0b1220;
    font-size: 18px;
}

.drop-zone h4 {
    margin: 0 0 12px;
    color: #0b1220;
    font-size: 14px;
}

.drop-zone p {
    margin: 0 0 20px;
    color: #6b7280;
    font-size: 14px;
}

.drop-zone .btn-secondary,
.drop-zone-modal .btn-secondary {
    pointer-events: auto;
}

body.dark-mode .drop-zone {
    border-color: #0D5E76;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

body.dark-mode .drop-zone:hover {
    border-color: #4da6b8;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.15) 0%, rgba(255, 107, 107, 0.1) 100%);
}

body.dark-mode .drop-zone.dragover {
    border-color: #4da6b8;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.2) 0%, rgba(255, 107, 107, 0.15) 100%);
}

body.dark-mode .drop-zone h3 {
    color: #e5e7eb;
}

body.dark-mode .drop-zone h4 {
    color: #e5e7eb;
}

body.dark-mode .drop-zone p {
    color: #9ca3af;
}

body.dark-mode .drop-zone-modal {
    border-color: #0D5E76;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

body.dark-mode .drop-zone-modal:hover {
    border-color: #4da6b8;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.15) 0%, rgba(255, 107, 107, 0.1) 100%);
}

body.dark-mode .drop-zone-modal.dragover {
    border-color: #4da6b8;
    background: linear-gradient(135deg, rgba(13, 94, 118, 0.2) 0%, rgba(255, 107, 107, 0.15) 100%);
}

@media (max-width: 600px) {
    .tools-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .tool-item {
        flex-direction: column;
    }

    .tool-actions {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }

    .btn-edit,
    .btn-delete {
        flex: 1;
    }

    .modal-content {
        width: 95%;
    }
}

/* View Profile Page Styles */
.user-info-section {
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

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

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

.info-row label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.info-row p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

.profile-name-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-email {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

.user-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* Dark mode for view profile */
body.dark-mode .user-info-section {
    background: #1f2937;
}

body.dark-mode .info-row {
    border-bottom-color: #374151;
}

body.dark-mode .info-row label {
    color: #f3f4f6;
}

body.dark-mode .info-row p {
    color: #d1d5db;
}

body.dark-mode .profile-name-info h3 {
    color: #f3f4f6;
}

body.dark-mode .user-email {
    color: #d1d5db;
}

body.dark-mode .user-tools-section h4 {
    color: #f3f4f6;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #0b1220;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #0b1220;
    background: #f3f4f6;
    border-radius: 8px;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 12px 0;
    color: #374151;
    line-height: 1.6;
}

.modal-body strong {
    color: #0b1220;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Dark mode modal */
body.dark-mode .modal-content {
    background: #2d2d2d;
}

body.dark-mode .modal-header {
    border-bottom-color: #444;
}

body.dark-mode .modal-header h3 {
    color: #f3f4f6;
}

body.dark-mode .modal-close {
    color: #a0a0a0;
}

body.dark-mode .modal-close:hover {
    color: #f3f4f6;
    background: #374151;
}

body.dark-mode .modal-body {
    color: #d1d5db;
}

body.dark-mode .modal-body p {
    color: #d1d5db;
}

body.dark-mode .modal-body strong {
    color: #f3f4f6;
}

body.dark-mode .modal-footer {
    border-top-color: #444;
}