/* My Manager - Viewer Styles */

.hidden { display: none !important; }

/* Viewer Layout */
.viewer-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.viewer-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.back-link {
    display: block;
    padding: 10px 15px;
    background: var(--bg-secondary, #161b22);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 6px;
    color: var(--accent-blue, #58a6ff);
    text-decoration: none;
    font-family: var(--font-mono, monospace);
    font-size: 0.9em;
    transition: background 0.2s;
}

.back-link:hover {
    background: var(--bg-tertiary, #21262d);
}

.card {
    background: var(--bg-secondary, #161b22);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 8px;
    padding: 15px;
}

.card h3 {
    color: var(--accent-green, #238636);
    font-family: var(--font-mono, monospace);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #30363d);
}

.card p {
    margin: 6px 0;
    font-size: 0.9em;
    color: var(--text-secondary, #8b949e);
}

.card p strong {
    color: var(--text-primary, #c9d1d9);
}

.card .empty {
    font-style: italic;
    opacity: 0.6;
}

/* Viewer Main */
.viewer-main {
    min-width: 0;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color, #30363d);
}

.main-header h1 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-primary, #c9d1d9);
}

.main-header .actions {
    display: flex;
    gap: 8px;
}

/* Sections */
.sections-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section {
    background: var(--bg-secondary, #161b22);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 8px;
    overflow: hidden;
}

.section.collapsed .section-body {
    display: none;
}

.section.collapsed .toggle {
    transform: rotate(-90deg);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--bg-tertiary, #21262d);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.section-header:hover {
    background: #2d333b;
}

.section-header .icon {
    font-size: 1.2em;
}

.section-header h3 {
    flex: 1;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary, #c9d1d9);
}

.section-header .toggle {
    transition: transform 0.2s;
    color: var(--text-secondary, #8b949e);
}

.section-body {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

/* Fields */
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field label {
    font-size: 0.8em;
    color: var(--text-secondary, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field .value {
    font-family: var(--font-mono, monospace);
    font-size: 1em;
    color: var(--text-primary, #c9d1d9);
    word-break: break-word;
}

.field .edit-input {
    background: var(--bg-primary, #0d1117);
    color: var(--text-primary, #c9d1d9);
    border: 1px solid var(--accent-blue, #58a6ff);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: var(--font-mono, monospace);
    font-size: 0.95em;
    width: 100%;
}

.field .edit-input:focus {
    outline: none;
    border-color: var(--accent-cyan, #39d0d8);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.9em;
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

.notification.success {
    background: var(--accent-green, #238636);
    color: white;
}

.notification.error {
    background: var(--accent-red, #da3633);
    color: white;
}

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

/* Responsive */
@media (max-width: 900px) {
    .viewer-layout {
        grid-template-columns: 1fr;
    }
    
    .viewer-sidebar {
        order: 2;
    }
    
    .main-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Print */
@media print {
    .viewer-sidebar,
    .main-header .actions,
    .back-link,
    .section-header {
        display: none !important;
    }
    
    .viewer-layout {
        grid-template-columns: 1fr;
    }
    
    .section {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    .section-body {
        display: block !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
