/* ============================================================
   MPC File Manager — Frontend Design System
   ============================================================ */

.mpcfm-file-browser {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin: 24px 0;
    max-width: 100%;
}

/* --- Folder Header --- */
.mpcfm-folder-header {
    margin-bottom: 24px;
}
.mpcfm-folder-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d2327;
}
.mpcfm-file-new-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.6;
    background: #e6f7e6;
    color: #007017;
    vertical-align: middle;
}
.mpcfm-folder-description {
    margin: 0 0 16px;
    color: #646970;
    font-size: 14px;
}

/* --- Toolbar --- */
.mpcfm-toolbar {
    margin-bottom: 16px;
}
.mpcfm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #dcdcde;
    background: #fff;
    color: #444;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.mpcfm-btn:hover {
    background: #f0f0f1;
    border-color: #b4b4b4;
}
.mpcfm-btn-zip {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    box-shadow: 0 1px 3px rgba(34,113,177,0.2);
}
.mpcfm-btn-zip:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    box-shadow: 0 2px 6px rgba(34,113,177,0.3);
}
.mpcfm-btn-open {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #2271b1;
}
.mpcfm-btn-open:hover {
    background: #e5f0fa;
    border-color: #2271b1;
    color: #135e96;
}
.mpcfm-btn-download {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    box-shadow: 0 1px 3px rgba(34,113,177,0.2);
}
.mpcfm-btn-download:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    box-shadow: 0 2px 6px rgba(34,113,177,0.3);
}

/* --- Breadcrumbs --- */
.mpcfm-breadcrumbs {
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f6f7f7;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.mpcfm-breadcrumbs a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 0;
}
.mpcfm-breadcrumbs a:hover {
    text-decoration: underline;
    color: #135e96;
}
.mpcfm-breadcrumbs strong {
    color: #1d2327;
    font-weight: 600;
    padding: 2px 0;
}
.mpcfm-breadcrumb-sep {
    margin: 0 8px;
    color: #a7aaad;
    font-weight: 300;
}

/* --- Table --- */
.mpcfm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mpcfm-table thead {
    background: #f6f7f7;
}
.mpcfm-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
    color: #646970;
    background: #f6f7f7;
}
.mpcfm-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.mpcfm-table tbody tr:last-child td {
    border-bottom: none;
}
.mpcfm-table tbody tr:hover {
    background: #fafafa;
}
.mpcfm-odd {
    background: #fff;
}
.mpcfm-even {
    background: #f9f9f9;
}

/* --- File Link --- */
.mpcfm-file-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mpcfm-file-link:hover {
    text-decoration: underline;
    color: #135e96;
}

/* --- Subfolder --- */
.mpcfm-subfolder-row {
    background: #f0f6fc !important;
}
.mpcfm-subfolder-row:hover {
    background: #e5f0fa !important;
}
.mpcfm-subfolder-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mpcfm-subfolder-link:hover {
    text-decoration: underline;
}

/* --- Column Widths --- */
.mpcfm-td-icon {
    width: 44px;
    text-align: center;
}
.mpcfm-td-icon img {
    vertical-align: middle;
}
.mpcfm-td-name {
    min-width: 160px;
}
.mpcfm-td-size {
    width: 100px;
    color: #646970;
    font-size: 13px;
    white-space: nowrap;
}
.mpcfm-td-date {
    width: 130px;
    color: #646970;
    font-size: 13px;
    white-space: nowrap;
}
.mpcfm-td-actions {
    width: 190px;
    white-space: nowrap;
}
.mpcfm-td-actions .mpcfm-btn {
    margin-right: 6px;
    padding: 5px 12px;
    font-size: 12px;
}
.mpcfm-td-actions .mpcfm-btn:last-child {
    margin-right: 0;
}

/* --- Thumbnail in table --- */
.mpcfm-table-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}

/* --- Folder Badge (frontend) --- */
.mpcfm-folder-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 10px;
    vertical-align: middle;
    line-height: 1.5;
}
.mpcfm-folder-badge-danger  { background: #fce6e6; color: #b32d2e; }
.mpcfm-folder-badge-warning { background: #fef7e0; color: #996800; }
.mpcfm-folder-badge-info    { background: #e5f0fa; color: #2271b1; }
.mpcfm-folder-badge-success { background: #e6f7e6; color: #007017; }

/* --- Empty State --- */
.mpcfm-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #787c82;
}
.mpcfm-empty-state .mpcfm-empty-icon {
    font-size: 36px;
    color: #c3c4c7;
    margin-bottom: 10px;
    display: block;
}
.mpcfm-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mpcfm-table {
        font-size: 13px;
        border-radius: 6px;
    }
    .mpcfm-table th,
    .mpcfm-table td {
        padding: 10px 8px;
    }
    .mpcfm-td-actions {
        width: auto;
    }
    .mpcfm-td-actions .mpcfm-btn {
        display: block;
        margin-right: 0;
        margin-bottom: 4px;
        text-align: center;
        width: 100%;
    }
    .mpcfm-td-date,
    .mpcfm-td-size {
        display: none;
    }
    .mpcfm-td-icon {
        width: 32px;
    }
    .mpcfm-folder-title {
        font-size: 18px;
    }
}
