/* ========================================================
   GLOBAL STRUCTURAL RESET
   ======================================================== */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    background-color: #fafbfc; 
    font-family: 'Inter', sans-serif;
    color: #172b4d;
    line-height: 1.5;
}

/* ========================================================
   HEADER & NAVIGATION DESIGN FIXES
   ======================================================== */
.custom-header {
    background: #ffffff;
    border-bottom: 1px solid #dfe1e6;
    padding: 15px 24px;
    width: 100%;
}

.custom-navbar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0052cc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.custom-logo span { color: #172b4d; }

.custom-logo img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.custom-nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.custom-nav-links a {
    text-decoration: none;
    color: #42526e;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.custom-nav-links a:hover {
    color: #0052cc;
}

.custom-nav-btns {
    display: flex;
    align-items: center;
    gap: 15px;
}

.custom-login-btn {
    text-decoration: none;
    color: #172b4d;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.15s;
}
.custom-login-btn:hover { background: #f4f5f7; }

.custom-primary-btn {
    text-decoration: none;
    background: #0052cc;
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,82,204,0.15);
    transition: background 0.15s;
}
.custom-primary-btn:hover { background: #0065ff; }

/* ========================================================
   ADVANCED WORKSPACE GRID LAYOUT
   ======================================================== */
.main-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 50px auto;
    padding: 0 24px;
}

.readme-sidebar {
    background-color: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 25px;
    height: fit-content;
    box-shadow: 0 4px 12px rgba(9, 30, 66, 0.04);
}

.readme-sidebar h3 {
    font-size: 1.15rem;
    color: #091e42;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-list {
    list-style: none;
    padding: 0;
}

.instruction-list li {
    font-size: 0.9rem;
    color: #42526e;
    padding: 12px 0;
    border-bottom: 1px dashed #dfe1e6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.instruction-list li:last-child {
    border-bottom: none;
}

.sidebar-note {
    margin-top: 20px;
    background-color: #fff9e6;
    border-left: 4px solid #ff9900;
    padding: 12px;
    font-size: 0.85rem;
    color: #7a5200;
    border-radius: 4px;
}

.tool-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tool-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #091e42;
    margin-bottom: 5px;
}

.tool-header p {
    color: #6b778c;
    font-size: 1rem;
}

/* ========================================================
   CONFIGURATION PANEL & DROP ZONE Elements
   ======================================================== */
.config-panel {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.drop-zone {
    border: 2px dashed #ff5630;
    border-radius: 8px;
    padding: 70px 20px;
    text-align: center;
    cursor: pointer;
    background: #fafbfc;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover, .drop-zone.drag-over {
    background: #fff5f5;
    border-color: #ff5630;
}

.upload-icon {
    font-size: 4.5rem;
    color: #ff5630;
    margin-bottom: 20px;
}

.drop-zone p {
    font-size: 1.15rem;
    color: #42526e;
    font-weight: 500;
}

.drop-zone span {
    color: #ff5630;
    font-weight: 600;
}

.drop-zone.file-loaded {
    border-color: #107c41 !important;
    background: #edf7f2 !important;
}
.drop-zone.file-loaded .upload-icon {
    color: #107c41 !important;
}

/* ========================================================
   CRYPTO EXTENSION INTERFACES
   ======================================================== */
.password-input-area {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.password-input-area label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #172b4d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-input-area input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    font-size: 100%;
    outline: none;
    background: #ffffff;
    transition: border 0.2s;
}

.password-input-area input:focus {
    border-color: #107c41;
}

/* ========================================================
   BUTTONS, ALERTS, AND USER BADGES CONTROLS
   ======================================================== */
.btn-shield, .download-action-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
    font-weight: 600;
    background-color: #107c41;
    color: white;
    border: none;
    border-radius: 6px;
    margin-top: 25px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(16, 124, 65, 0.15);
}

.btn-shield:hover, .download-action-btn:hover { background-color: #0b5931; }
.btn-shield:disabled, .download-action-btn:disabled { background-color: #a5adba; cursor: not-allowed; box-shadow: none; }

.status-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
}
.status-box.error { background: #fdeaea; color: #e52521; border: 1px solid #ffbdad; }
.status-box.success { background: #eaf6ed; color: #107c41; border: 1px solid #abf5d1; }

.hidden-element, .hidden { display: none !important; }

.logout-btn { background: #f4f5f7; color: #172b4d; padding: 10px 20px; border-radius: 6px; text-decoration: none; font-weight: 600; margin-left: 10px; cursor: pointer; border: 1px solid #dfe1e6; }
.logout-btn:hover { background: #ebecf0; color: #e52521; }
.user-badge { font-weight: 600; color: #172b4d; display: flex; align-items: center; gap: 8px; background: #f4f5f7; padding: 8px 15px; border-radius: 6px; border: 1px solid #dfe1e6; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 992px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}
