/* AOS File Transfer - Styles */

/* Reset and Base */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 50px; /* Space for fixed footer */
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background-color: #1C75BC;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 0.5rem 1rem;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.nav-logo {
    height: 40px;
    width: auto;
    margin: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0.75rem 2rem;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: white;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 2rem;
}

.user-info {
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 20px;
}

.section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

/* Login Section */
.login-container {
    max-width: 400px;
    margin: 0 auto;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

/* Forms */
.form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Center form buttons */
.form button[type="submit"] {
    display: block;
    width: 100%;
    margin: 0 auto;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1C75BC;
    box-shadow: 0 0 0 2px rgba(28, 117, 188, 0.2);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #1C75BC;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #165496;
}

.btn-secondary {
    background-color: #f1f3f4;
    color: #333;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

.btn-link {
    background: none;
    color: #1C75BC;
    text-decoration: underline;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* File Upload */
.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.file-details {
    font-size: 0.9rem;
}

/* Progress Bar */
.progress {
    height: 24px;
    background-color: #f1f3f4;
    border-radius: 12px;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #1C75BC;
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* File List */
.file-list {
    min-height: 200px;
}

.file-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-item.expiring-soon {
    border-color: #ff9800;
    background-color: #fff8e1;
}

.file-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.file-item-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.file-item-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.file-item-details p {
    margin: 0.25rem 0;
}

.time-remaining {
    font-weight: 500;
}

.text-warning {
    color: #ff9800;
}

.file-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Admin Section */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #1C75BC;
    border-bottom-color: #1C75BC;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Tables */
#filesTable,
#auditTable {
    margin-top: 1rem;
    overflow-x: auto;
}

.bulk-actions {
    margin-bottom: 1rem;
}

/* Messages */
.message-container {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.message-container.info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid #1976d2;
}

.message-container.success {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid #4caf50;
}

.message-container.error {
    background-color: #ffebee;
    color: #b71c1c;
    border-left: 4px solid #f44336;
}

/* Utility Classes */
.loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 3rem;
    font-size: 1.1rem;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 2rem;
}

.admin-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.admin-link a {
    color: #1C75BC;
    text-decoration: none;
    font-weight: 500;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0;
    }
    
    .nav-container {
        flex-direction: row;
        flex-wrap: nowrap; /* Prevent wrapping */
        align-items: stretch;
        overflow-x: auto; /* Allow horizontal scroll if needed */
        -webkit-overflow-scrolling: touch;
    }
    
    .logo-section {
        padding: 0.5rem;
        flex-shrink: 0; /* Prevent logo from shrinking */
    }
    
    .nav-logo {
        height: 30px; /* Smaller logo on mobile */
    }
    
    .nav-brand {
        flex: 1;
        padding: 0.5rem;
        min-width: 0; /* Allow text to shrink */
    }
    
    .nav-brand h1 {
        font-size: 1rem; /* Smaller font */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* Add ellipsis for long text */
    }
    
    .nav-menu {
        padding: 0.5rem;
        font-size: 0.75rem; /* Smaller font */
        flex-shrink: 0; /* Prevent menu from shrinking */
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-menu .btn {
        padding: 0.375rem 0.75rem; /* Smaller button */
        font-size: 0.75rem;
    }
    
    .user-info {
        font-size: 0.75rem;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Rest of responsive styles remain the same */
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .nav-logo {
        height: 25px;
    }
    
    .nav-brand h1 {
        font-size: 0.9rem;
    }
    
    .nav-brand {
        padding: 0.5rem 0.25rem;
    }
    
    .user-info {
        display: none; /* Hide user info on very small screens */
    }
    
    .nav-menu .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Footer */
.page-footer {
    background-color: #1C75BC;
    color: white;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 999;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-left {
    text-align: left;
    flex: 1;
}

.footer-center {
    text-align: center;
    flex: 1;
}

.footer-right {
    text-align: right;
    flex: 1;
}

/* Footer link styling */
.footer-link {
    color: white;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-content {
        padding: 0 1rem;
        font-size: 0.8rem;
    }
    
    .footer-content p {
        font-size: 0.75rem;
    }
    
    .footer-left p {
        font-size: 0.7rem;
    }
}

/* Pulse animation for admin login button */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* Admin login highlight */
.admin-link a.btn-warning {
    background-color: #ffc107;
    color: #333;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
}

.admin-link a.btn-primary {
    background-color: #1C75BC;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
}

/* Email tag input styles */
.email-tag-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    min-height: 42px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    background: white;
    cursor: text;
}

.email-tag-input:focus-within {
    border-color: #1C75BC;
    box-shadow: 0 0 0 2px rgba(28, 117, 188, 0.2);
}

.email-tag {
    background-color: #e8f0fe;
    color: #1967d2;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    animation: tagAppear 0.2s ease-out;
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.email-tag.invalid {
    background-color: #fce8e6;
    color: #d93025;
}

.email-tag button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.7;
}

.email-tag button:hover {
    opacity: 1;
}

.email-tag-input input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 200px;
    padding: 0.25rem;
    font-size: 1rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
}

.modal-header {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
    line-height: 1.6;
}