/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
img { max-width:100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #1a1a1a;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: #fffcfc;
    color: white;
    padding: 0;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    margin-top: 60px;
    margin-left: -20px;
}
.sidebar.sidebar_main {
    display: block;
}
.sidebar-logo {
    padding: 15px 1.5rem;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #220E27;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 0;
    border-top: solid 1px #e1e1e1;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    color: #220E27;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: #14a0ee;
}

.sidebar-footer {
    position: absolute;
    bottom: 6rem;
    width: 100%;
    padding: 0 1.5rem;
}
.table-content {
    overflow-x: auto;
}
.upgrade-card {
    background: #e5f2fa;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.upgrade-card h4 {
    margin-bottom: 8px;
    font-size: 14px;
    color: #111827;
}

.upgrade-card p {
    font-size: 0.85rem;
    margin-bottom: 7px;
    opacity: 0.9;
    color: #111827;
}
.upgrade-card a.btn-upgrade {
    width: 100%;
    background: #14a0ee;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    padding: 10px 0;
    text-decoration: none;
    font-size: 14px;
    margin: 0;
}
.btn-upgrade {
    width: 100%;
    padding: 0.75rem;
    background: #14a0ee;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Main Content Area */
.main-content {
    margin-left: 0;
    margin-top: 25px;
    padding: 0;
    width: 100%;
}

/* Header Styles */
.header {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 5px;
    box-shadow: 0px 0px 3px #00000030;
    border: 1px solid #c2d8fa80;
    display: flex;
    justify-content:center;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 20px;
    color: #1a1a1a;
}
.header .btn.btn-primary {
    width: 100%;
    margin-top: 10px;
}
/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #2e4095;
    color: white;
}

.btn-primary:hover {
    background: #2e4095;
}

.btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-view {
    background: #eff6ff;
    color: #1e40af;
}

.btn-view:hover {
    background: #dbeafe;
}

.btn-download {
    background: #dcfce7;
    color: #166534;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-download:hover {
    background: #bbf7d0;
}

.btn-share {
    background: #fef3c7;
    color: #92400e;
}

.btn-share:hover {
    background: #fde68a;
}

/* Stats Cards */
.stats {
    display: flex;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 5px;
}

.stat-card {
    width: 33.33%;
    height: 100%;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0px 0px 3px #00000030;
    border: 1px solid #c2d8fa80;
    margin: 10px 0;
    text-align: center;
}

.stat-card h3 {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 5px;
    font-weight: 500;
    min-height: 30px;
}

.stat-card p {
    font-size: 28px;
    font-weight: 700;
    color: #263aa7;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0px 0px 3px #00000030;
    border: 1px solid #c2d8fa80;
    overflow: hidden;
}

.table-header {
    padding: 10px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.table-header h2 {
    font-size: 1.25rem;
    color: #1a1a1a;
}
span.table-title-text {
    display: block;
    font-size: 12px;
    color: #7d7d7d;
    padding-bottom: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f9fafb;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table td.qrcodeimg {
    padding-right: 0;
}
.table-content .qr-item-row {
    border-bottom: 2px solid #f3f4f6;
}
.table-content .qr-item-row td.viewtd {
    padding-left: 0;
}
table#table-content tbody {
    padding: 0;
    display: block;
    position: relative;
    top: -1px;
}
.table-email {
    display: block;
    width: 100%;
    word-break: break-all;
}
td {
    padding: 0 10px;
    border-top: 0;
/*    vertical-align: top;*/
    font-size: 14px;
}

tr:hover td {
    background: #fafbfc;
}
.action-btns.dashboard-action {
    display: flex;
    flex-direction: row;
    position: relative;
    top: 2px;   
}
table#table-content td.tableqr-texttd {
    width: 100%;
    padding-right: 0;
    min-width: 80px;
}
table#table-content .qr-name {
    font-size: 10px;
}
table#table-content .time-date {
    font-size: 10px;
}
table#table-content td.viewtd {
    padding: 0;
    width: 80%;
}
table#table-content td.viewtd table tr td.time-date-td {
    width: 50%;
}
table#table-content td.viewtd table tr td {
    width: 50%;
}
/* QR Code Specific */
.qr-preview {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    background: #f9fafb;
    padding: 5px;
}

.type-badge {
    display: inline-block;
    padding: 0;
    /* background: #ede9fe; */
    color: red;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.preview-qr-detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 10px;
    background: #f3f1f1;
}
.preview-qr-detail span {
    font-size: 13px;
    font-weight: 600;
    color: #5f5858;
}
.preview-qr-detail .qr-prev-title {
    position: relative;
    left: -34px;
}
.preview-qr-detail .scans-prev-title {
    position: relative;
    left: -49px;
}
.preview-qr-detail .action-prev-title {
    position: relative;
    left: -48px;
}


/* Form Inputs */
.input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 5px;
    background: #fff;
}

.input-field:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: #6b7280;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
}

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

.modal-header h2 {
    font-size: 1.75rem;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

/* Plans Grid */
.plans {
    display: block;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.plans-page h2 {
    margin: 0;
    font-size: 20px;
    text-align: center;
    color: #333;
    padding-top: 0;
    padding-bottom: 20px;
}
.plan {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    position: relative;
}
.plan.popular {
    border-color: #4f46e5;
    background: #faf5ff;
    margin: 25px 0 20px;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #4f46e5;
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan h3 {
    font-size: 15px;
    margin-bottom: 0;
    color: #1a1a1a;
}

.plan-price {
    font-size: 17px;
    font-weight: 700;
    color: #4f46e5;
    margin: 1px 0;
}

.plan-price span {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.plan ul {
    list-style: none;
    text-align: left;
    margin: 3px 0 10px;
}

.plan li {
    padding: 1px 0;
    color: #4b5563;
    font-size: 14px;
}

.plan li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}
.plan-month {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.plans-page button.btn.btn-primary {
    padding: 10px 10px;
}
.main_content.view-page #upgradeModal {
    position: absolute;
}
.view-page .modal-content {
    padding: 20px;
}
.view-page .modal-content .plans {
    display: block;
}
.view-page .modal-content .plans .plan.popular {
   margin: 30px 0 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .plans {
        grid-template-columns: 1fr;
    }
}
       /* ===== Header Navbar Styles ===== */
        .navbar {
            position: sticky;
            top: 0;
            left: 0; /* same as sidebar width */
            right: 0;
            height: 60px;
            background: #fff9f9;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 25px;
            margin: 0 -20px;
            z-index: 100;
        }

        .navbar .brand {
            display: flex;
            align-items: center;
            font-weight: 800;
            font-size: 20px;
            color: #011059;
            text-transform: uppercase;
        }
/*        .navbar .brand img {
            width: 32px;
            margin-right: 5px;
            position: relative;
            top: 0;
        }*/
.navbar .brand img {
    display: block;
    width: 100%;
    max-width: 165px;
}        

        .navbar .nav-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .navbar .username {
            font-weight: 500;
            color: #444;
        }

        .navbar .logout-btn {
            background: #ff4d4d;
            color: white;
            border: none;
            padding: 8px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: 0.2s;
        }

        .navbar .logout-btn:hover {
            background: #e04141;
        }

        /* Adjust main content to avoid overlap */

        /* Responsive tweak */
        @media (max-width: 768px) {
            .navbar {
                left: 0;
            }
            .main-content {
                margin-left: 0;
            }
        }

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .action-btns {
        flex-direction: column;
    }
}

/*new css*/
table#table-content td.viewtd table tbody {
  padding: 0;
  position: relative;
  top: -4px;    
}
table#table-content td.viewtd table tr td.scan-count-td {
    width: 20%;
    text-align: center;
}
.scan-count-td .scan-count {
    font-size: 14px;
    font-weight: 600;
    position: relative;
    top: 2px;
}
.main_content.opnenavbar:before {
    content: '';
    background: #000;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.5;
}
.header .stats {
    margin: 12px 0 0;
    gap: 15px;
}
.header .stats .stat-card {
    margin: 0;
}
.dashboard-new-qr-btn {
    text-align: center;
    padding: 8px 0 12px;
}
.dashboard-new-qr-btn button.btn-primary {
    width: 100%;
}
