/* ==========================================================================
   Premium Notes App Architecture Tokens (System Architecture Defaults)
   ========================================================================== */

:root {
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --radius: 18px;
    --radius-sm: 10px;
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

/* Base Normalizations */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.app-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.header-contact {
    display: flex;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--text-main);
}

/* ==========================================================================
   Workspace Layout Elements
   ========================================================================== */
.workspace-container {
    max-width: 1400px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 2.5rem;
    flex-grow: 1;
}

.sidebar-panel {
    width: 400px;
    flex-shrink: 0;
}

.notes-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Base Premium Card Design Architecture */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-lg);
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

/* Form Controls & Styling */
.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.input-group input, 
.input-group textarea {
    font-family: var(--font-stack);
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 0.85rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
    resize: none;
}

.input-group input:focus, 
.input-group textarea:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 0.35rem;
}

/* Action Buttons Design Language */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    flex-grow: 1;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: #F1F5F9;
    color: #475569;
}

.btn-secondary:hover {
    background-color: #E2E8F0;
    color: #1E293B;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Workspace Content Infrastructure (Search & Dashboard Grid)
   ========================================================================== */
.search-bar-container {
    position: relative;
    width: 100%;
}

.search-bar-container input {
    width: 100%;
    font-family: var(--font-stack);
    font-size: 1rem;
    padding: 1.1rem 1.25rem 1.1rem 3.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: var(--transition);
}

.search-bar-container input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-premium), 0 0 0 4px rgba(37, 99, 235, 0.05);
}

.search-icon {
    position: absolute;
    left: 1.35rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Dynamic Interactive Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-content: start;
    min-height: 400px;
}

/* Note Instance Interface Styling Rules */
.note-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    transition: var(--transition);
    animation: fadeIn 0.45s var(--transition);
    position: relative;
}

.note-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(37, 99, 235, 0.15);
}

.note-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.note-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    word-break: break-word;
}

.pin-icon {
    color: var(--primary);
    font-size: 0.85rem;
    opacity: 0.7;
}

.note-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    /* -webkit-line-clamp: 5; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #F1F5F9;
    padding-top: 1rem;
    margin-top: auto;
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.action-btn.edit {
    color: var(--text-muted);
    background-color: #F8FAFC;
}

.action-btn.edit:hover {
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.08);
}

.action-btn.delete {
    color: var(--text-muted);
    background-color: #F8FAFC;
}

.action-btn.delete:hover {
    color: #EF4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Empty State Styling Elements */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    border: 2px dashed var(--border-color);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.5;
}

/* ==========================================================================
   Premium Application Toast Architecture
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.toast {
    background-color: #0F172A;
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-premium);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.35s var(--transition);
    transition: var(--transition);
}

.toast.success i { color: #10B981; }
.toast.info i { color: #3B82F6; }
.toast.danger i { color: #EF4444; }

/* Structural Animation Framework */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(100%) translateY(0); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

.note-card.delete-leave {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ==========================================================================
   Footer Component Configuration
   ========================================================================== */
.app-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.heart {
    color: #EF4444;
    display: inline-block;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-main);
}