/**
 * Main Stylesheet
 * Global styles for PDF Upload Admin Panel
 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark-color);
    line-height: 1.6;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   PROGRESS BAR STYLES
   ============================================ */

.upload-progress {
    margin: 15px 0;
    padding: 10px;
    background: var(--light-color);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.progress-bar {
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: var(--dark-color);
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    padding: 50px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    font-size: 16px;
    color: #6c757d;
}

.login-form {
    margin-bottom: 30px;
}

.demo-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--warning-color);
}

.demo-info h3 {
    font-size: 14px;
    color: #856404;
    margin-bottom: 10px;
}

.demo-info ul {
    list-style: none;
    margin-left: 0;
}

.demo-info li {
    font-size: 13px;
    color: #856404;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    font-size: 24px;
    margin: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    font-size: 14px;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    flex: 1;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 20px;
    margin: 0;
}

.card-body {
    padding: 30px;
}

/* ============================================
   STATISTICS GRID
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="file"] {
    padding: 15px;
    cursor: pointer;
}

small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8e 100%);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-download {
    background: var(--success-color);
    color: white;
}

.btn-download:hover {
    background: #218838;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 18px;
}

.alert-text {
    flex: 1;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.status-message {
    margin-top: 20px;
}

/* ============================================
   FILE UPLOAD
   ============================================ */

.upload-form {
    margin-bottom: 20px;
}

.file-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.file-preview h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.file-preview ul {
    list-style: none;
    margin-left: 0;
}

.file-preview li {
    padding: 5px 0;
    color: #6c757d;
    font-size: 14px;
}

/* ============================================
   FILES TABLE
   ============================================ */

.files-table {
    overflow-x: auto;
}

.files-table table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background: #f8f9fa;
}

.files-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    color: var(--dark-color);
}

.files-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.files-table tr:hover {
    background: #f8f9fa;
}

.file-name {
    font-weight: 500;
    color: var(--dark-color);
}

.actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state small {
    display: block;
    color: #adb5bd;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }

    .login-container {
        padding: 30px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }

    .files-table {
        font-size: 12px;
    }

    .files-table th,
    .files-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .card-body {
        padding: 20px;
    }

    .stat-number {
        font-size: 24px;
    }
}
