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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    position: relative;
    width: 100%;
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.header img {
    height: 56px;
}

.header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a3a5c;
}

.container {
    width: 100%;
    max-width: 560px;
    padding: 0 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #1a3a5c;
}

/* Drop zone */
.drop-zone {
    border: 2px dashed #c0c8d4;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 20px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #2b6cb0;
    background: #ebf4ff;
}

.drop-zone .icon {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}

.drop-zone .label {
    font-size: 15px;
    color: #666;
}

.drop-zone .filename {
    margin-top: 8px;
    font-weight: 600;
    color: #2b6cb0;
    word-break: break-all;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43,108,176,0.12);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
    background: #2b6cb0;
    color: #fff;
}

.btn-primary:hover {
    background: #225a94;
}

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

.btn-success {
    background: #38a169;
    color: #fff;
    margin-top: 12px;
}

.btn-success:hover {
    background: #2f855a;
}

/* Progress */
.progress-section {
    display: none;
}

.progress-section.active {
    display: block;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin: 16px 0 8px;
}

.progress-bar {
    height: 100%;
    background: #2b6cb0;
    border-radius: 5px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* Status messages */
.status-message {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
}

.status-message.error {
    background: #fed7d7;
    color: #c53030;
}

.status-message.success {
    background: #c6f6d5;
    color: #276749;
}

/* Download section */
.download-section {
    display: none;
    text-align: center;
}

.download-section.active {
    display: block;
}

/* Login overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card .login-logo {
    height: 56px;
    margin-bottom: 16px;
}

.login-card h2 {
    font-size: 20px;
    color: #1a3a5c;
    margin-bottom: 24px;
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn-primary {
    margin-top: 8px;
}

/* Logout button */
.btn-logout {
    position: absolute;
    right: 24px;
    background: none;
    border: 1px solid #c0c8d4;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-logout:hover {
    background: #fed7d7;
    color: #c53030;
    border-color: #c53030;
}

/* History section */
.history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.history-header h2 {
    margin-bottom: 0;
}

.history-badge {
    background: #2b6cb0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.history-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 12px 0;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.history-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid #e2e8f0;
    color: #666;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.history-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f2f5;
    color: #444;
}

.history-table tbody tr:hover {
    background: #f7fafc;
}

.history-table .dir-label {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #ebf4ff;
    color: #2b6cb0;
    white-space: nowrap;
}

.btn-download-sm {
    background: #38a169;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download-sm:hover {
    background: #2f855a;
}

.btn-download-sm.expired {
    background: #e2e8f0;
    color: #999;
    cursor: default;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: #999;
}
