body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f1f1f1;
    overflow-y: hidden;
}
.admin-bar {
    background: #23282d;
    color: #fff;
    padding: 10px;
    text-align: right;
}
.wp-admin {
    display: flex;
}
.sidebar {
    width: 200px;
    background: #23282d;
    color: #fff;
    padding-top: 10px;
    height: 100vh;
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar ul li {
    padding: 10px 20px;
    cursor: pointer;
}
.sidebar ul li.active, .sidebar ul li:hover {
    background-color: #0073aa;
}
.main-area {
    flex-grow: 1;
    padding: 20px;
}
header nav {
    margin-top: 10px;
}
header nav button {
    margin-right: 10px;
    padding: 6px 12px;
    cursor: pointer;
}
.plugin-tab {
    display: none;
    margin-top: 20px;
}
.plugin-tab.active {
    display: block;
}

.admin-bar {
    background: #23282d;
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-bar .site-name {
    font-weight: bold;
    padding-left: 10px;
}

.admin-bar .howdy {
    padding-right: 10px;
}

.nav-tab-wrapper {
    display: flex;
    margin-top: 15px;
}

.nav-tab {
    background: #e3e3e3;
    border: 1px solid #ccc;
    padding: 10px 25px;
    margin-right: 5px;
    font-weight: bold;
    color: #444;
    text-decoration: none;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.nav-tab-active {
    background: #fefefe;
    border-bottom: none;
    color: #000;
}

.expiry-actions {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.expiry-actions .btn {
    padding: 10px 16px;
    margin-right: 10px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.expiry-actions .btn-add {
    background-color: #16a34a;
    color: #fff;
}
.expiry-actions .btn-refresh {
    background-color: transparent;
    color: #2271b1;
    border: solid 1px #2271b1;
}
.expiry-actions .btn-export {
    margin-left: auto;
    background-color: #22c55e;
    color: #fff;
}

.expiry-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.expiry-table th, .expiry-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

.expiry-table th {
    background: #f9f9f9;
    font-weight: bold;
}

.expiry-table td a {
    color: #2563eb;
    text-decoration: underline;
}

.badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
}
.badge.active {
    background-color: #16a34a;
}
.badge.expired {
    background-color: #ef4444;
}

.action-icons {
    font-size: 1.1rem;
    display: flex;
    gap: 8px;
}

.expiry-settings .form-group {
    margin-bottom: 20px;
}

.expiry-settings input[type="text"],
.expiry-settings input[type="number"] {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 300px;
    font-size: 1rem;
}

.expiry-settings label {
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
}

.expiry-settings .btn-save {
    background: #16a34a;
    color: white;
    padding: 10px 16px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.expiry-settings .btn-deactivate {
    background: #1e3a8a;
    color: white;
    margin-left: 10px;
    padding: 10px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.outdated-demo-note {
    margin-top: 30px;
    background: #fff7ed;
    border-left: 4px solid #facc15;
    padding: 15px;
    color: #78350f;
    font-size: 0.95rem;
    max-width: 90%;
}

/* ==== Modal Base ==== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    width: 400px;
    max-width: 95%;
}
.modal h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

/* ==== Modal Content Types ==== */
.modal input[type="text"],
.modal input[type="number"],
.modal input[type="datetime-local"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    margin: 12px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.modal .modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.modal .btn-save {
    background-color: #32cd32;
    color: white;
    padding: 10px 25px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal .btn-cancel {
    background-color: #0069b4;
    color: white;
    padding: 10px 25px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* === Extended Modal for Duration === */
.modal-duration {
    width: 700px;
    max-width: 95%;
}

.modal-duration .time-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.modal-duration .time-options input {
    width: 100%;
}

.action-icons span {
    cursor: pointer;
    font-size: 1.1rem;
    margin-right: 10px;
    transition: transform 0.1s ease;
}
.action-icons span:hover {
    transform: scale(1.2);
}

/* Action icons styling */
.action-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.action-icons button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
}
.action-icons button:hover {
    transform: scale(1.1);
}

/* Modal base */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 300px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.modal-content h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}
.modal-content .form-group {
    margin: 20px 0;
}
.modal-content input,
.modal-content select {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Buttons */
.modal-content .btn,
.modal-content .cancel-btn {
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    margin: 10px 5px 0;
    cursor: pointer;
}
.modal-content .btn {
    background: #28a745;
    color: white;
}
.modal-content .cancel-btn {
    background: #0073aa;
    color: white;
}
.modal-content .btn-danger {
    background: #dc3545;
}

/* Export Button Position Fix */
.expiry-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.expiry-actions .btn-export {
    margin-left: auto;
}
/* NEW MODAL */

.modal2 {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal2-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 400px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}
.modal2-box.wide {
    width: 550px;
}
.modal2-box h3 {
    margin-top: 0;
}
.modal2-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.modal2-time input {
    width: 70px;
    margin-right: 10px;
}
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}
.btn-danger {
    background: #dc3545;
    color: white;
}
.btn-success {
    background: #28a745;
    color: white;
}
.cancel {
    background: #0073aa;
    color: white;
}

.modal2-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 500px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 16px;
}

.modal2-box h2 {
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

.modal2-box label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
    color: #333;
}

.modal2-box input,
.modal2-box select {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.modal2-box .time-inputs {
    display: flex;
    gap: 10px;
}

.modal2-box .time-inputs input {
    flex: 1;
    min-width: 0;
}

.modal2-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal2-actions .btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.modal2-actions .btn-green {
    background-color: #16a34a;
    color: white;
}

.modal2-actions .btn-blue {
    background-color: #1d4ed8;
    color: white;
}

.expiry-settings {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.expiry-settings h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.expiry-settings .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    max-width: 600px;
}

.expiry-settings .form-group label {
    flex: 0 0 180px;
    font-weight: bold;
    color: #333;
}

.expiry-settings .form-group input[type="text"],
.expiry-settings .form-group input[type="number"] {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.expiry-settings .form-group.license {
    align-items: center;
    gap: 10px;
}

.expiry-settings .btn-deactivate {
    background: #0074a2;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.expiry-settings .btn-save {
    background: #00b200;
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.expiry-settings .toggle-switch {
    position: relative;
    display: inline-block;
    max-width: 45px;
    height: 24px;
}

.expiry-settings .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.expiry-settings .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.expiry-settings .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.expiry-settings .toggle-switch input:checked + .toggle-slider {
    background-color: #28a745;
}

.expiry-settings .toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(21px);
}