@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: local('Material Icons'),
         local('MaterialIcons-Regular'),
         url(material-icons.ttf) format('truetype');
}

@font-face{
    font-family: 'Open Sans Regular';
    font-size: normal;
    font-weight: 400;
    src: local('Open Sans'),
         local('OpenSans-Regular'),
         url(OpenSans-Regular.ttf) format('truetype');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    font-family: "Open Sans Regular" !important;
}

main {
    font-family: "Open Sans Regular" !important;
    flex: 1 0 auto;
}

.nav-wrapper {
    padding: 0 2em;
}

#ftp-form-container {
    margin: 10px 0;
}

.info-container {
    margin: 4px;
}

#info-text {
    font-size: 24px;
    padding: 8px 0;
    border-radius: 10px;
}

.loader {
    width: 50%;
}

.danger-alert {
    width: 100%;
    color: #fff !important;
    background-color: #ef5350 !important;
    border: 2px solid #000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.danger-alert:hover {
    background-color: #f44336 !important;
}

.success-alert {
    width: 100%;
    color: #fff !important;
    background-color: #66bb6a !important;
    border: 2px solid #000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.success-alert:hover {
    background-color: #4caf50 !important;
}

.directory {
    transition: all 0.3s ease;
}

.directory:hover {
    background-color: #e0e0e0 !important;
}

.icon-list {
    opacity: 0;
    transition: all 0.3s ease;
}

.directory:hover .icon-list {
    opacity: 1;
}

.dir-name {
    font-weight: 600;
    cursor: pointer;
}

.icon-list > i {
    margin-left: 6px;
}

.rename-icon {
    color: orange !important;
}

.delete-icon {
    color: red !important;
}

.download-icon {
    color: green !important;
}

.archive-icon {
    color: orange !important;
}

#overlay {
    display: block;
    position: fixed !important;
    height: 100% !important;
    width: 100% !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    z-index: 999;
}

#loader {
    display: block;
    z-index: 9999;
}

#loader > div.preloader-wrapper {
    position: fixed !important;
    margin: auto !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

#rename-modal, #new-folder-modal, #upload-file-modal {
    width: fit-content;
}

#op-fab > i {
    transform: rotate(0deg);
    transition: transform 0.4s ease;
}

#op-fab:hover i {
    transform: rotate(45deg);
}

footer {
    margin-top: 20px;
}

/* Modern Login Form Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1f2933, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.modern-login-card {
    width: 100%;
    max-width: 420px;
    background: #0f172a;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    color: #e5e7eb;
}

.modern-login-card h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    text-align: center;
    color: #e5e7eb;
}

.modern-login-card p {
    margin: 0 0 24px;
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* Login Forms */
.login-form {
    display: block;
}

.modern-form-group {
    margin-bottom: 16px;
}

.modern-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.modern-form-row .modern-form-group {
    flex: 1;
    margin-bottom: 0;
}

.modern-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #cbd5f5;
    font-family: inherit;
}

.modern-label:has(+ .modern-input[required])::after,
.modern-label[for="ftp-username"]::after,
.modern-label[for="ftp-password"]::after {
    content: " *";
    color: #ef4444;
    font-weight: bold;
}

.modern-input {
    width: 100% !important;
    padding: 12px 14px !important;
    border-radius: 10px !important;
    border: 1px solid #334155 !important;
    background: #020617 !important;
    color: #e5e7eb !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    margin: 0 !important;
    height: auto !important;
}

.modern-input::placeholder {
    color: #6b7280 !important;
}

.modern-input:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    box-shadow: none !important;
}

.modern-input:invalid {
    border-color: #ef4444 !important;
}

.modern-input:focus + .modern-label {
    color: #6366f1 !important;
}

.modern-button {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #6366f1;
    color: white !important;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: none;
    box-shadow: none;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modern-button .material-icons {
    font-size: 20px;
    margin: 0 !important;
}

.modern-button:hover {
    background: #4f46e5 !important;
    box-shadow: none;
}

.modern-button:disabled {
    background: #374151 !important;
    cursor: not-allowed;
}

.modern-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.helper-text-modern {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
}

@media (max-width: 420px) {
    .modern-login-card {
        padding: 24px 20px;
        border-radius: 12px;
        margin: 16px;
    }
    
    .modern-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .modern-form-row .modern-form-group {
        margin-bottom: 16px;
    }
}

/* Dark theme for main application */
body.app-connected {
    background: linear-gradient(135deg, #1f2933, #111827);
    min-height: 100vh;
}

.app-connected main.container {
    background: #0f172a;
    margin-top: 20px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    color: #e5e7eb;
}

.app-connected .collection {
    background: #1e293b;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.app-connected .collection-item {
    background: transparent;
    border-bottom: 1px solid #374151;
    color: #e5e7eb;
}

.app-connected .collection-item:last-child {
    border-bottom: none;
}

.app-connected .collection-item:hover {
    background: #374151;
}

.app-connected .collection-item:hover .title {
    color: #0f172a !important;
}

.app-connected .collection-item:hover p {
    color: #1e293b !important;
}

.app-connected .collection-item:hover .material-icons {
    color: #0f172a !important;
}

.app-connected .collection-item .title {
    color: #e5e7eb;
}

.app-connected .collection-item p {
    color: #9ca3af;
}

.app-connected .collection-item .material-icons {
    color: #6366f1;
}

.app-connected .btn {
    background: #6366f1;
    border-radius: 8px;
}

.app-connected .btn:hover {
    background: #4f46e5;
}

.app-connected .orange.darken-1 {
    background: #f97316 !important;
}

.app-connected .purple.darken-1 {
    background: #7c3aed !important;
}

.app-connected .blue {
    background: #3b82f6 !important;
}

.app-connected .green {
    background: #10b981 !important;
}

.app-connected .input-field label {
    color: #9ca3af;
}

.app-connected .input-field input:focus + label {
    color: #6366f1 !important;
}

.app-connected .input-field input:focus {
    border-bottom: 1px solid #6366f1 !important;
    box-shadow: 0 1px 0 0 #6366f1 !important;
}

.app-connected .dropdown-content {
    background: #1e293b;
    border-radius: 8px;
}

.app-connected .dropdown-content li > span {
    color: #e5e7eb;
}

.app-connected .modal {
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 12px;
}

.app-connected .modal h4 {
    color: #e5e7eb;
}

.app-connected .toast {
    border-radius: 8px;
}

.app-connected header nav {
    background: #1e293b !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.app-connected .brand-logo {
    color: #6366f1 !important;
    font-weight: bold;
}

.app-connected nav ul a {
    color: #e5e7eb !important;
}

.app-connected nav ul a:hover {
    background: rgba(99, 102, 241, 0.1);
}

.app-connected .info-container {
    background: #1e293b;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.app-connected .success-alert {
    background: #065f46 !important;
    color: #d1fae5 !important;
    border: none;
}

.app-connected .danger-alert {
    background: #7f1d1d !important;
    color: #fecaca !important;
    border: none;
}

.app-connected #location-container {
    background: #1e293b;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Checkbox styling for listing options */
.count-badge {
    background: #6366f1;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.listing-toggle-checkbox + span {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.listing-toggle-checkbox + span .material-icons.tiny {
    font-size: 18px;
    margin-right: 8px;
}

.app-connected .listing-toggle-checkbox + span {
    color: #e5e7eb;
}

.app-connected .count-badge {
    background: #6366f1;
    color: white;
}

.app-connected .modal h5 {
    color: #e5e7eb;
    margin-bottom: 15px;
}

.app-connected .btn-small {
    margin-right: 10px;
    margin-bottom: 10px;
}

.app-connected .blue {
    background: #3b82f6 !important;
}

.app-connected .grey {
    background: #6b7280 !important;
}
