:root {
    /* Core Brand Colors */
    --shmc-main: #5ea730;
    --shmc-main-hover: #4d8a27;
    --shmc-success: #10b981;
    --shmc-danger: #ef4444;
    --shmc-danger-hover: #dc2626;

    /* Neutrals & Backgrounds */
    --shmc-bg: #f8fafc;
    --shmc-card-bg: #ffffff;
    --shmc-text: #1e293b;
    --shmc-text-muted: #64748b;
    --shmc-border: #e2e8f0;

    /* Layout & Design System */
    --shmc-radius: 16px;
    --shmc-radius-sm: 10px;
    --shmc-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --shmc-progress-bg: #f1f5f9;
    --shmc-gradient: linear-gradient(90deg, #5ea730, #4d8a27);
}

.shmc-wrap {
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
}

.shmc-card {
    background: var(--shmc-card-bg);
    border: 1px solid var(--shmc-border);
    border-radius: var(--shmc-radius);
    padding: 32px;
    box-shadow: var(--shmc-shadow);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* --- TOOLBAR --- */
.shmc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shmc-filter-group {
    display: flex;
    gap: 10px;
    flex-grow: 1;
}

.shmc-input {
    border: 1px solid var(--shmc-border);
    padding: 10px 15px;
    border-radius: var(--shmc-radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

/* --- BUTTONS --- */
.shmc-btn-primary {
    background: var(--shmc-main);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--shmc-radius-sm);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.shmc-btn-danger {
    background: var(--shmc-danger);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: var(--shmc-radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.shmc-btn-danger:hover {
    background-color: var(--shmc-danger-hover);
}

.shmc-btn-secondary {
    background: var(--shmc-main);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: var(--shmc-radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.shmc-btn-secondary:hover {
    background-color: var(--shmc-main-hover);
}

/* --- TABLE FIXES FOR OVERLAP --- */
.shmc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: auto;
}

.shmc-table th,
.shmc-table td {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--shmc-border);
    vertical-align: middle;
}

/* --- TABLE COLUMN TARGETING --- */
.shmc-table th,
.shmc-table td {
    padding: 16px;
    border-bottom: 1px solid var(--shmc-border);
    vertical-align: middle;
}

/* Checkbox Column */
.shmc-table th:first-child,
.shmc-table td:first-child {
    width: 30px;
}

/* Preview Column */
.shmc-table th:nth-child(2),
.shmc-table td:nth-child(2) {
    width: 60px;
}

/* Scan Page - Size Column (4th) */
#shmc-scan-table th:nth-child(4),
#shmc-scan-table td:nth-child(4) {
    width: 100px;
    text-align: center;
}

/* Vault Page - Size Column (5th) */
#shmc-unused-table th:nth-child(5),
#shmc-unused-table td:nth-child(5) {
    width: 100px;
    text-align: center;
}

/* Filename Column: Make it bold */
.shmc-table td.shmc-filename {
    font-weight: 600;
    color: var(--shmc-text);
    word-break: break-word;
}

/* Storage Path Column Code Styling */
.shmc-table td code {
    display: block;
    white-space: normal;
    word-break: break-all;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--shmc-text-muted);
    border: 1px solid var(--shmc-border);
    max-width: 100%;
}

/* --- PROGRESS BARS --- */
.shmc-progress-bar {
    background: var(--shmc-progress-bg);
    height: 12px;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid var(--shmc-border);
}

#shmc-fill,
#shmc-restore-fill {
    background: var(--shmc-gradient);
    width: 0%;
    height: 100%;
    transition: width 0.4s ease;
}

/* --- SUCCESS UI & ANIMATIONS --- */
.shmc-success-view {
    text-align: center;
    padding: 60px 20px;
    border: 2px dashed var(--shmc-success);
    background: rgba(16, 185, 129, 0.02);
}

.shmc-success-animation {
    position: relative;
    display: inline-block;
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
}

/* The Glow Animation Overlay */
.shmc-success-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    margin-left: -40px;
    margin-top: -40px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    transform: scale(0);
    animation: shmc-glow-expand 0.8s ease-out 0.4s forwards;
    z-index: 0;
}

/* The Pop & Fade-in Animation for the Success Icon */
.shmc-success-animation img {
    width: 80px !important;
    height: 80px !important;
    display: block;
    position: relative;
    z-index: 1;
    transform: scale(0);
    opacity: 0;
    animation: shmc-image-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
}

a:hover,
a:active,
a:focus {
    color: white;
    text-decoration: none;
    border: none;
}

.shmc-btn-primary:hover {
    background-color: var(--shmc-main-hover);
}

.shmc-size-badge {
    background: #f1f5f9;
    color: var(--shmc-main);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--shmc-border);
    display: inline-block;
}

.shmc-actions {
    display: flex;
    gap: 12px;
}

@keyframes shmc-image-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shmc-glow-expand {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* File Icon Styles */
.shmc-file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shmc-icon-pdf {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
}

.shmc-icon-doc {
    background-color: #e0f2fe;
    border: 1px solid #bae6fd;
}

.shmc-icon-video {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
}

.shmc-icon-audio {
    background-color: #f3e8ff;
    border: 1px solid #e9d5ff;
}

.shmc-icon-archive {
    background-color: #ffedd5;
    border: 1px solid #fed7aa;
}

.shmc-icon-other {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* --- RESPONSIVE --- */
@media (max-width: 800px) {
    .shmc-table td:nth-child(2) {
        max-width: 150px;
    }

    .shmc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

.hidden {
    display: none !important;
}

/* --- AUTOMATION PAGE STYLES --- */
.shmc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .shmc-grid {
        grid-template-columns: 1fr;
    }
}

.shmc-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--shmc-border);
}

.shmc-field:last-of-type {
    border-bottom: none;
}

.shmc-field label {
    font-weight: 600;
    color: var(--shmc-text);
}

/* Toggle Switch */
.shmc-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.shmc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--shmc-main);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Countdown Timer */
.shmc-countdown {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.shmc-time-box {
    background: var(--shmc-bg);
    padding: 15px;
    border-radius: var(--shmc-radius-sm);
    text-align: center;
    min-width: 80px;
    border: 1px solid var(--shmc-border);
}

.shmc-time-box span {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--shmc-main);
}

.shmc-time-box label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--shmc-text-muted);
    margin-top: 5px;
    display: block;
}

.shmc-timer-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

/* --- NOTICE STYLES --- */
.shmc-notice {
    background: #fff9db;
    border-left: 5px solid #fab005;
    border-radius: var(--shmc-radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.shmc-notice-icon {
    font-size: 24px;
}

.shmc-notice-content {
    color: #856404;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.shmc-notice-content strong {
    font-weight: 700;
}