:root {
    --bg-color: #fff;
    --text-color: #000;
    --link-color: #0000ee;
    --border-color: #999;
    --hr-color: #ccc;
    --subtext-color: #666;
    --input-bg: #fff;
    --accent-color: #2d6a4f; /* Verde hoja oscuro (tipo bosque/hoja madura) */
    --accent-hover: #1b4332;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --link-color: #52b788;
    --border-color: #444;
    --hr-color: #333;
    --subtext-color: #aaa;
    --input-bg: #1e1e1e;
    --accent-color: #40916c;
    --accent-hover: #52b788;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

h1 {
    font-family: 'Architects Daughter', cursive, serif;
    font-size: 28px;
    font-weight: normal;
    margin: 0;
}

h3 {
    font-size: 16px;
    font-weight: normal;
    margin: 0;
}

a {
    color: var(--link-color);
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

button,
input,
textarea {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    padding: 6px 10px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.15);
}

button {
    cursor: pointer;
    background-color: var(--bg-color);
    transition: all 0.2s ease;
}

button:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button.primary-btn, 
.auth-card-landing button,
.auth-card button {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.auth-card-landing button:hover,
.auth-card button:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

textarea {
    width: 100%;
    height: 180px;
    min-height: 120px;
    resize: vertical;
    box-sizing: border-box;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    box-sizing: border-box;
}

hr {
    border: 0;
    border-top: 1px solid var(--hr-color);
    margin: 15px 0;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.landing-container {
    text-align: center;
    padding-top: 20px;
}

.landing-icon {
    display: inline-flex;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    margin-bottom: 10px;
    color: var(--accent-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.landing-icon:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

.landing-features {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--subtext-color);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateX(4px);
    color: var(--text-color);
}

.feature-item svg {
    color: var(--accent-color);
}

.auth-card-landing {
    text-align: left;
    border: 1px solid var(--border-color);
    padding: 15px;
    transition: box-shadow 0.3s ease;
}

.auth-card-landing:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-card-landing input {
    margin-top: 4px;
}

.pass-card {
    border: 1px solid var(--border-color);
    padding: 10px;
    margin-bottom: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pass-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.small {
    color: var(--subtext-color);
    font-size: 12px;
}

.hidden {
    display: none !important;
}

.actions-bar, .tabs-bar, .header-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.actions-bar, .tabs-bar {
    justify-content: flex-start;
}

.tabs-bar button {
    border-bottom: 2px solid transparent;
}

.tabs-bar button.active {
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.error-text {
    color: #ef4444;
}

.small-btn {
    padding: 4px 8px;
    font-size: 12px;
}

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

.modal-content {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================================== */
/* ESTILOS PARA ACCIONES, ICONOS SVG Y TOOLTIPS DE NOTAS      */
/* ========================================================== */
.note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    margin: 8px 0;
    border: 1px solid transparent;
    border-radius: 0;
    transition: all 0.2s ease;
}

.note-item:hover {
    border-color: var(--border-color);
}

.note-item.selected {
    border-color: var(--accent-color);
    background-color: var(--input-bg);
}

.note-item a {
    flex-grow: 1;
    text-decoration: none;
    color: var(--text-color);
}

.note-item.selected a {
    color: var(--accent-color);
    font-weight: bold;
}

.note-actions {
    display: none;
    gap: 8px;
    align-items: center;
}

.note-item.selected .note-actions {
    display: flex;
}

/* Iconos sin recuadro (limpios) */
.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: var(--subtext-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
    color: var(--accent-color);
    background: transparent;
    border: none;
    transform: scale(1.1);
}

.icon-btn.delete-icon:hover {
    color: #ef4444;
    background: transparent;
    border: none;
}

/* Tooltip alineado al estilo general */
.tooltip {
    position: relative;
    display: inline-flex;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    position: absolute;
    z-index: 10;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
