* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    background: white;
    padding: 8px 12px;
    margin-bottom: 10px;
    border-bottom: 2px solid #ce2e30;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-container h2 {
    color: #ce2e30;
    font-size: 1rem;
    font-weight: 600;
}

.nav-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-right span {
    color: #666;
    font-size: 0.8rem;
}

.nav-right strong {
    color: #333;
}

/* Login Container */
.login-container {
    max-width: 320px;
    margin: 40px auto;
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.login-container h1 {
    text-align: center;
    color: #ce2e30;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    font-size: 0.85rem;
    background: white;
    color: #333;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ce2e30;
}

.form-group small {
    display: block;
    margin-top: 2px;
    color: #666;
    font-size: 0.75rem;
}

/* File Drop Area */
.file-drop-area {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
}

.file-drop-area.highlight {
    border-color: #ce2e30;
    background: #e3f2fd;
}

.file-drop-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.file-drop-text {
    margin: 5px 0;
    color: #666;
    font-size: 0.85rem;
}

.file-drop-or {
    margin: 10px 0;
    color: #999;
    font-size: 0.75rem;
}

.file-name {
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 5px 10px;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary {
    background: #34a853;
    color: white;
}

.btn-primary:hover {
    background: #2d8e47;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-danger {
    background: #db4437;
    color: white;
}

.btn-danger:hover {
    background: #c33d2e;
}

/* Alerts */
.alert {
    padding: 8px 10px;
    margin-bottom: 10px;
    font-weight: 500;
    border-left: 3px solid;
    font-size: 0.8rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Dashboard */
.dashboard h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Cards */
.card {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #ce2e30;
    padding-bottom: 5px;
}

/* lift Grid */
.lift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.lift-card {
    background: white;
    padding: 12px;
    border: 2px solid #ddd;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.lift-card:hover {
    border-color: #ce2e30;
}

.lift-header {
    margin-bottom: 6px;
}

.lift-header h3 {
    color: #333;
    font-size: 0.9rem;
    display: inline-block;
    margin-right: 6px;
}

.lift-code {
    background: #333;
    color: white;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: 600;
}

.lift-info {
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.lift-info p {
    margin-bottom: 3px;
    color: #666;
}

.lift-info strong {
    color: #333;
}

.lift-link {
    margin: 6px 0 2px 0;
}

.lift-link label {
    display: block;
    margin-bottom: 2px;
    color: #333;
    font-size: 0.75rem;
    font-weight: 600;
}

.lift-link input {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid #ddd;
    font-size: 0.75rem;
    background: #f8f9fa;
    color: #333;
    font-family: monospace;
}

.copy-btn {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 3px 6px;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.lift-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.lift-actions .btn,
.lift-actions form,
.lift-actions form button {
    flex: 1;
}

.lift-actions .btn {
    text-align: center;
    font-size: 0.65rem;
    padding: 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.lift-actions form {
    margin: 0;
}

.lift-actions form button {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Documents List */
.documents-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.document-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #ddd;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.document-item:hover {
    border-color: #ce2e30;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.pdf-icon {
    width: 60px;
    height: 60px;
    background: #d32f2f;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
}

.pdf-icon::before {
    content: 'PDF';
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.document-info {
    flex: 1;
    width: 100%;
}

.document-info strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.85rem;
    word-break: break-word;
    line-height: 1.3;
}

.document-info small {
    color: #666;
    font-size: 0.7rem;
    display: block;
}

.document-size {
    color: #888;
    font-size: 0.7rem;
    margin-top: 3px;
}

.document-actions {
    display: none;
}

.document-actions form {
    margin: 0;
    display: inline;
}

.delete-btn {
    background: #db4437;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.document-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #c33d2e;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 0.85rem;
}

.empty-state h2 {
    color: #333;
    margin-bottom: 10px;
}

/* View Container (Public View) */
.view-container {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.view-header {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #ce2e30;
    margin-bottom: 12px;
}

.view-header h1 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.view-location {
    color: #666;
    font-size: 1rem;
}

.view-location strong {
    color: #333;
}

.view-content {
    margin-top: 15px;
}

.document-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

.document-info-bar span {
    color: #666;
    font-size: 0.9rem;
}

.pdf-viewer {
    width: 100%;
    height: calc(100vh - 300px);
    min-height: 500px;
    border: 1px solid #ddd;
    background: white;
}

.fallback-link {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.fallback-link a {
    color: #4CAF50;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .container {
        max-width: 100%;
    }

    .navbar {
        padding: 6px 10px;
    }

    .nav-container {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    .nav-container h2 {
        text-align: center;
        font-size: 0.9rem;
    }

    .nav-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .login-container {
        max-width: 100%;
        margin: 20px auto;
        padding: 15px;
    }

    .dashboard h1 {
        font-size: 1.1rem;
        text-align: center;
    }

    .card {
        padding: 10px;
        margin-bottom: 8px;
    }

    .card h2 {
        font-size: 0.95rem;
    }

    .lift-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .lift-card {
        padding: 10px;
        min-height: 180px;
    }

    .lift-header h3 {
        font-size: 0.85rem;
        display: block;
        margin-bottom: 4px;
    }

    .lift-code {
        display: inline-block;
        font-size: 0.65rem;
    }

    .lift-link input {
        font-size: 0.7rem;
        padding: 4px;
    }

    .lift-actions {
        flex-direction: column;
        gap: 4px;
    }

    .lift-actions .btn {
        width: 100%;
        padding: 5px;
        font-size: 0.75rem;
    }

    .document-item {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 12px;
    }

    .documents-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .pdf-icon {
        width: 50px;
        height: 50px;
    }

    .pdf-icon::before {
        font-size: 0.9rem;
    }

    .document-info {
        width: 100%;
    }

    .document-info strong {
        font-size: 0.85rem;
        word-break: break-word;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 8px;
    }

    .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* View page (public) */
    .view-container {
        padding: 10px;
    }

    .view-header h1 {
        font-size: 1.1rem;
    }

    .view-content h2 {
        font-size: 0.95rem;
    }

    .pdf-viewer {
        height: 400px;
        min-height: 300px;
    }
}