.drive-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.drive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.drive-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.drive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.drive-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.drive-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.item-preview {
    height: 160px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.drive-item:hover .item-preview img {
    transform: scale(1.05);
}

.item-info {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    flex-grow: 1;
}

.item-name {
    display: block;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.item-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.item-actions {
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    background: #f8fafc;
}

.btn-icon {
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-icon:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    transform: scale(1.1);
}

.btn-icon.text-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.drive-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 2rem;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
}

.file-icon-wrapper {
    font-size: 3.5rem;
    color: #cbd5e1;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.type-pdf { color: #ef4444; }
.type-video { color: #8b5cf6; }
.type-audio { color: #10b981; }
.type-doc { color: #3b82f6; }
.type-sheet { color: #22c55e; }
.type-zip { color: #f59e0b; }

.ext-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #fff;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

/* Tabs Styling */
.nav-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.nav-item {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: #3b82f6;
}

.nav-link.active {
    color: #3b82f6;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    border-radius: 2px;
}

/* Custom Modal System (Non-Bootstrap fallback) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content {
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-body {
    padding: 1.5rem;
    line-height: 1.6;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.btn-close:hover {
    color: #1e293b;
}

.btn-secondary {
    background: #f1f5f9;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-primary {
    background: #3b82f6;
    border: none;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

/* Image Preview Modal */
.preview-modal {
    background: rgba(15, 23, 42, 0.9);
}

.preview-content-wrapper {
    max-width: 90vw;
    max-height: 90vh;
}

.preview-content-wrapper img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
}

.btn-close-preview {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-preview:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}
