/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

header h1 {
    font-size: 1.8em;
    margin-bottom: 8px;
    font-weight: 600;
    color: #222;
}

.subtitle {
    font-size: 0.95em;
    color: #666;
    margin: 4px 0;
}

.company {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

/* Card */
.card {
    background: white;
    border: 1px solid #ddd;
    padding: 25px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
}

.card h3 {
    font-size: 1.1em;
    margin: 20px 0 15px 0;
    font-weight: 600;
    color: #444;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #999;
}

.upload-area.dragover {
    border-color: #666;
    background: #f0f0f0;
}

.upload-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    opacity: 0.6;
}

.upload-area p {
    color: #666;
    margin: 8px 0;
    font-size: 0.95em;
}

.or-text {
    color: #999;
    font-size: 0.9em;
    margin: 12px 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #444;
    font-weight: 500;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    font-size: 0.95em;
    transition: border-color 0.2s;
    background: white;
}

.form-control[type="file"] {
    padding: 8px;
}

.form-control:focus {
    outline: none;
    border-color: #666;
}

/* OR Separator */
.or-separator {
    display: flex;
    align-items: center;
    margin: 25px 0;
    gap: 12px;
}

.or-separator hr {
    flex: 1;
    border: none;
    border-top: 1px solid #ddd;
}

.or-separator span {
    color: #999;
    font-size: 0.85em;
}

textarea.form-control {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group .form-control {
    flex: 1;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: 1px solid #333;
    background: #333;
    color: white;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #555;
    border-color: #555;
}

.btn:active {
    background: #222;
}

.btn-primary {
    background: #333;
    border-color: #333;
}

.btn-primary:hover {
    background: #555;
}

.btn-secondary {
    background: white;
    color: #333;
    border: 1px solid #ccc;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn-success {
    background: #2d7a3f;
    border-color: #2d7a3f;
}

.btn-success:hover {
    background: #3a8f50;
}

.btn-info {
    background: #0066aa;
    border-color: #0066aa;
}

.btn-info:hover {
    background: #0077cc;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

/* File Info */
.file-info {
    margin-top: 18px;
    padding: 15px;
    background: #fafafa;
    border-left: 3px solid #666;
}

.file-info h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1em;
}

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

.file-list li {
    padding: 6px 0;
    border-bottom: 1px solid #e5e5e5;
    font-size: 0.9em;
}

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

/* Messages */
.success-message {
    padding: 12px 15px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    margin-bottom: 18px;
    font-size: 0.95em;
}

.error-message {
    padding: 12px 15px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    margin-bottom: 18px;
    font-size: 0.95em;
}

.info-message {
    padding: 12px 15px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    color: #1565c0;
    margin-bottom: 18px;
    font-size: 0.95em;
}

/* Password Box */
.password-box {
    padding: 15px;
    background: #fffbf0;
    border: 1px solid #e0d5a8;
    margin-top: 18px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    word-break: break-all;
}

.password-box strong {
    display: block;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #666;
    font-size: 0.9em;
}

/* Secrets List */
.secrets-lis18px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
}

.secret-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background 0.15s;
}

.secret-item:hover {
    background: #f5f5f5;
}

.secret-item.selected {
    background: #333;
    color: white;
}

.secret-item:last-child {
    border-bottom: none;
}

.secret-name {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.secret-id {
    font-size: 0.85em;
    opacity: 0.65;
}

/* Status Area */
#status-area {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    z-index: 1000;
}

.status-message {
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid;
    font-size: 0.9em;
}

.status-success {
    background: #e8f5e9;
    border-color: #c8e6c9;
    color: #2e7d32;
}

.status-error {
    background: #ffebee;
    border-color: #ffcdd2;
    color: #c62828;
}

.status-info {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1565c0;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    border-top-color: #333;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    text-align: center;
    color: #888;
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
}

footer p {
    margin: 4px 0;
}

.version {
    font-size: 0.85em;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }

    .card {
        padding: 18
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    #status-area {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}
