:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #0f172a;
    --container-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(79, 70, 229, 0.3);
    --input-focus: rgba(79, 70, 229, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Dynamic Animated Background */
.background-animation {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}


.blur-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: rgba(79, 70, 229, 0.3);
    top: -150px;
    left: -150px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.25);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -60px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.login-container {
    background: var(--container-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(79, 70, 229, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
}

.profile-avatar:hover {
    transform: scale(1.08) rotate(3deg);
    border-color: var(--primary-color);
}

.login-header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    width: 100%;
    display: block;
}

.input-group i:first-child {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 1.1rem 3rem 1.1rem 3.2rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

.input-group input:focus+i {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 5;
}

.toggle-password:hover {
    color: #e2e8f0;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    width: 100%;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    position: relative;
}

.remember-me:hover {
    color: #e2e8f0;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    pointer-events: none;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: rgba(15, 23, 42, 0.8);
    border: 2px solid var(--input-border);
    border-radius: 6px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remember-me:hover input~.checkmark {
    border-color: var(--input-focus);
}

.remember-me input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}

.remember-me input:checked~.checkmark:after {
    display: block;
}

.forgot-password {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), #8B5CF6);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.6);
}

.btn-login:active {
    transform: translateY(0);
}

.security-badge {
    margin-top: 2rem;
    text-align: center;
    color: #10B981;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.security-badge i {
    font-size: 1rem;
}

@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
        width: 92%;
        border-radius: 20px;
    }
}

/* =========================================
   NOTLAR MODÜLÜ CSS
========================================= */

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 1.5rem;
    gap: 1.5rem;
    box-sizing: border-box;
    /* Reset any global body centering if needed */
    position: absolute;
    top: 0;
    left: 0;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-btn {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--text-main);
}

.category-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.category-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.3);
}

.category-item .delete-cat {
    color: #ef4444;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-item:hover .delete-cat {
    opacity: 1;
}

.add-category-form {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    outline: none;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--accent);
}

.btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    background: var(--content-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0 1rem;
    flex: 1;
    max-width: 400px;
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: var(--accent);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.8rem 0.5rem;
    outline: none;
    width: 100%;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: min-content;
    gap: 1.5rem;
    align-items: start;
    align-content: start;
}

.note-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100px;
    /* Force minimum height to prevent squishing */
}

.note-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(30, 41, 59, 0.8);
}

.note-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.note-icon {
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0.8;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.8rem;
    border-radius: 12px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-title-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.note-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.8rem 0;
    /* Increased margin for exact spacing */
    color: #fff;
    line-height: 1.4;
    word-wrap: break-word;
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* Push to bottom of wrapper */
}

.note-category-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #e2e8f0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 100%;
    max-width: 1200px;
    height: 95vh;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title-input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    outline: none;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    outline: none;
    margin-bottom: 1rem;
    width: 100%;
    font-family: inherit;
}

.modal-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1.5rem;
    border-radius: 12px;
    outline: none;
    resize: vertical;
    flex: 1;
    min-height: 50vh;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.modal-textarea:focus {
    border-color: var(--accent);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* File Input */
input[type="file"] {
    border: 1px dashed var(--glass-border);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
}

.preview-image {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid var(--glass-border);
}

/* =========================================
   DASHBOARD KONTROL PANELİ CSS (EMSİS TEKNOLOJİ)
========================================= */

body.dash-body {
    align-items: flex-start;
    padding: 1.5rem 1rem 3rem;
    background-color: #090d16;
}

.blob-3 {
    width: 520px;
    height: 520px;
    background: rgba(16, 185, 129, 0.14);
    top: 38%;
    left: 42%;
    animation-delay: -10s;
}

.dashboard-container {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    padding: 2rem 2.2rem;
    width: 96%;
    max-width: 1440px;
    text-align: left;
    color: var(--text-main);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(15px);
    animation: fadeUp 0.5s forwards;
    margin: 0 auto;
}

/* Header */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: rgba(30, 41, 59, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.25rem 1.6rem;
    margin-bottom: 1.8rem;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffffff;
    box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.55);
    flex-shrink: 0;
}

.brand-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 2px 9px;
    border-radius: 99px;
    margin-bottom: 4px;
}

.brand-text h1 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    background: linear-gradient(90deg, #ffffff 0%, #e2e8f0 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-search-box {
    position: relative;
    min-width: 240px;
}

.dash-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dash-search-box input {
    width: 100%;
    padding: 0.68rem 1rem 0.68rem 2.35rem;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.dash-search-box input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.dash-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}

.dash-date-pill i {
    color: #38bdf8;
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.68rem 1.15rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.dash-action-btn.settings-btn {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
}

.dash-action-btn.settings-btn:hover {
    background: rgba(99, 102, 241, 0.28);
    color: #ffffff;
    transform: translateY(-2px);
}

.dash-action-btn.danger-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 6px 16px -4px rgba(239, 68, 68, 0.45);
}

.dash-action-btn.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -4px rgba(239, 68, 68, 0.65);
}

/* Categorized Sections (Bölümler) */
.dash-section {
    background: rgba(18, 27, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 22px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.dash-section:last-of-type {
    margin-bottom: 0;
}

.dash-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.dash-section.section-emerald::before {
    background: linear-gradient(180deg, #10b981, #f59e0b);
}

.dash-section.section-indigo::before {
    background: linear-gradient(180deg, #6366f1, #a855f7);
}

.dash-section.section-cyan::before {
    background: linear-gradient(180deg, #06b6d4, #3b82f6);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.1rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 1rem;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 13px;
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.section-icon.emerald {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.section-icon.indigo {
    background: rgba(99, 102, 241, 0.16);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.section-icon.cyan {
    background: rgba(6, 182, 212, 0.16);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.section-title-group h2 {
    font-size: 1.12rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.section-title-group p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.section-count {
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 12px;
    border-radius: 99px;
    white-space: nowrap;
}

/* Module Cards Grid inside each Section */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    margin: 0;
}

.module-card {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.92);
}

.module-card.card-emerald:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.16);
}

.module-card.card-indigo:hover {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.18);
}

.module-card.card-cyan:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.16);
}

.card-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.module-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.25s ease;
}

.module-card:hover .module-icon-wrap {
    transform: scale(1.1);
}

.module-icon-wrap.emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(245, 158, 11, 0.18));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.module-icon-wrap.indigo {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.24), rgba(168, 85, 247, 0.2));
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.module-icon-wrap.cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.2));
    color: #38bdf8;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 99px;
    letter-spacing: 0.3px;
}

.card-tag.emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.card-tag.indigo {
    background: rgba(99, 102, 241, 0.14);
    color: #a5b4fc;
}

.card-tag.cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
}

.card-body {
    width: 100%;
}

.module-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 5px;
    letter-spacing: -0.2px;
}

.module-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

.card-arrow {
    position: absolute;
    bottom: 1.1rem;
    right: 1.1rem;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: #64748b;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
}

.module-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1180px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body.dash-body {
        padding: 1rem 0.5rem 2rem;
    }

    .dashboard-container {
        padding: 1.1rem;
        width: 100%;
    }

    .dash-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1.1rem;
    }

    .dash-controls {
        width: 100%;
        justify-content: space-between;
    }

    .dash-search-box {
        width: 100%;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }
}