﻿/* --- dark.css (Complete file with polished form styles) --- */

:root {
    /* DARK MODE COLOR PALETTE - Lighter Version */
    --bg-color: #2D3748;
    --text-color: #F7FAFC;
    --card-bg-color: #4A5567;
    --border-color: #718096;
    --subtle-text-color: #A0AEC0;
    --primary-color: #63B3ED;
    --primary-hover-color: #90CDF4;
    --shadow-color: rgba(0, 0, 0, 0.4);
    /* NEW: Specific variables for modal form inputs */
    --input-bg-color: #EDF2F7;
    --input-text-color: #1A202C;
    --input-placeholder-color: #718096;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.hidden {
    display: none !important;
}

header {
    width: 100%;
    max-width: 28rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.logo {
    width: auto;
    height: 2.5rem;
}

#menu-btn {
    font-size: 1.5rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.2s;
}

    #menu-btn:hover {
        background-color: var(--card-bg-color);
    }

#menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 14rem;
    background-color: var(--card-bg-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 50;
}

    #menu button {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-color);
        transition: background-color 0.2s;
    }

        #menu button:hover {
            background-color: var(--bg-color);
        }

#accounts {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.no-accounts {
    text-align: center;
    color: var(--subtle-text-color);
    padding: 3rem 0;
}

.account-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 var(--shadow-color), 0 1px 2px 0 var(--shadow-color);
    transition: box-shadow 0.2s;
    padding: 1rem;
}

    .account-card:hover {
        box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
    }

.account-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.account-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
}

.account-initial {
    width: 3rem;
    height: 3rem;
    background-image: linear-gradient(to bottom right, #60A5FA, #3B82F6);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.account-details {
    flex: 1;
    min-width: 0;
}

.issuer-name {
    font-weight: 600;
    font-size: 1.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email {
    font-size: 0.875rem;
    color: var(--subtle-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otp-code {
    font-size: 1.5rem;
    font-family: monospace;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
}

.refresh-timer {
    font-size: 0.75rem;
    color: var(--subtle-text-color);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: color 0.2s;
}

/* Modal Base */
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 1rem;
}

.modal-content {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    width: 91.666667%;
    max-width: 28rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.close-button {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    color: var(--subtle-text-color);
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

    .close-button:hover {
        color: var(--text-color);
    }

.modal h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- NEW AND IMPROVED FORM STYLES --- */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .modal-body label {
        font-weight: 600;
        font-size: 0.875rem;
        color: var(--text-color);
    }

    /* Style for Text Inputs */
    .modal-body input[type="text"] {
        padding: 0.75rem;
        border-radius: 0.375rem; /* Rounded corners */
        border: 1px solid transparent;
        background-color: var(--input-bg-color);
        color: var(--input-text-color); /* Dark text */
        outline: none;
        transition: box-shadow 0.2s;
        font-size: 1rem;
    }

        .modal-body input[type="text"]::placeholder {
            color: var(--input-placeholder-color);
            opacity: 1; /* Firefox fix */
        }

        .modal-body input[type="text"]:focus {
            box-shadow: 0 0 0 3px var(--primary-color);
        }

    /* Style for File Input */
    .modal-body input[type="file"] {
        background-color: #1A202C;
        color: var(--subtle-text-color);
        border-radius: 0.375rem;
        border: 1px solid var(--border-color);
        padding: 0.25rem;
    }

        .modal-body input[type="file"]::file-selector-button {
            background-color: var(--input-bg-color);
            color: var(--input-text-color);
            font-weight: 600;
            padding: 0.5rem 0.75rem;
            border: none;
            border-right: 1px solid #CBD5E0;
            margin-right: 1rem;
            border-radius: 0.25rem 0 0 0.25rem;
            cursor: pointer;
            transition: background-color 0.2s;
        }

            .modal-body input[type="file"]::file-selector-button:hover {
                background-color: #E2E8F0;
            }

    /* Style for Buttons */
    .modal-body button, #message-buttons button {
        background-color: var(--primary-color);
        color: #1A202C; /* Darker text for contrast */
        padding: 0.8rem;
        border-radius: 0.5rem; /* More rounded */
        border: none;
        cursor: pointer;
        transition: background-color 0.2s;
        margin-top: 1rem;
        font-weight: 700;
        font-size: 1rem;
    }

        .modal-body button:hover, #message-buttons button:hover {
            background-color: var(--primary-hover-color);
        }

#message-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

    #message-buttons button {
        padding: 0.5rem 1.25rem;
        margin-top: 0;
    }

#message-modal p {
    color: var(--subtle-text-color);
    margin-bottom: 0;
}


/* Button Color Overrides */
.copy-btn {
    color: #34D399;
}

    .copy-btn:hover {
        color: #10B981;
    }

.edit-btn {
    color: #FBBF24;
}

    .edit-btn:hover {
        color: #F59E0B;
    }

.delete-btn {
    color: #F87171;
}

    .delete-btn:hover {
        color: #EF4444;
    }

.cancel {
    background-color: #4B5563;
}

    .cancel:hover {
        background-color: #374151;
    }

.confirm-danger {
    background-color: #DC2626;
}

    .confirm-danger:hover {
        background-color: #B91C1C;
    }

/* Other styles */
#icon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.icon-preview-wrapper {
    position: relative;
    display: inline-block;
}

.icon-preview-img {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    object-fit: cover;
}

.delete-icon-btn {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background-color: #EF4444;
    color: #FFFFFF;
    border-radius: 9999px;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

    .delete-icon-btn:hover {
        background-color: #DC2626;
    }

#qr-reader {
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #16A34A;
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    z-index: 100;
    pointer-events: none;
}

    .toast.show {
        opacity: 1;
        bottom: 2.5rem;
    }

.font-mono {
    font-family: monospace;
}

.text-area {
    padding: 0.75rem; /* This adds the inner spacing (padding) */
    border-radius: 0.375rem; /* This creates the rounded corners */
}

